/* ============================================
   СТИЛИ ДЛЯ ШАПКИ КАБИНЕТА КАНДИДАТА
   Подключается на всех страницах кандидата
   ============================================ */

/* Базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Montserrat', 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

body {
    color: #333;
    line-height: 1.5;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Top Navigation for Authorized User */
.top-nav-auth {
    background-color: #fff;
    border-bottom: 2px solid #2688eb;
    padding: 16px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.top-nav-auth .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-auth-left, .nav-auth-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-auth-link {
    text-decoration: none;
    color: #2688eb;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
    white-space: nowrap;
    position: relative;
}

.nav-auth-link:hover {
    color: #333;
}

.nav-auth-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.icon-badge {
    position: relative;
}

.badge-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #ff4757;
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    z-index: 10;
}

.create-resume-btn {
    background-color: #2688eb;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.create-resume-btn:hover {
    background-color: #1a6ec0;
}

.dropdown {
    position: relative;
}

.dropdown-toggle {
    background: none;
    border: none;
    font-size: 20px;
    color: #333;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.dropdown-toggle:hover {
    background-color: #f5f5f5;
}

.dropdown.active .dropdown-toggle {
    background-color: #f5f5f5;
    color: #2688eb;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: 240px;
    z-index: 1000;
    display: none;
    margin-top: 10px;
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown.active .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: #f5f5f5;
    color: #2688eb;
}

.dropdown-divider {
    height: 1px;
    background-color: #e0e0e0;
}

.dropdown-user-info {
    padding: 14px 16px 12px;
    border-bottom: 1px solid #f0f0f0;
    background-color: #fafafa;
}

.dropdown-user-name {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    line-height: 1.3;
}

.dropdown-user-email {
    font-size: 13px;
    color: #999;
    margin-top: 2px;
    line-height: 1.3;
}

.dropdown-tariff {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 13px;
    color: #2688eb;
    background-color: #e3f2fd;
    border-bottom: 1px solid #bbdefb;
}

.dropdown-tariff i {
    font-size: 14px;
    width: 18px;
    text-align: center;
}

.dropdown-tariff span {
    font-weight: 600;
}

a.dropdown-tariff {
    text-decoration: none;
    cursor: pointer;
}

a.dropdown-tariff:hover {
    background-color: #bbdefb;
    color: #1a6fc4;
}

/* Main Header */
.main-header {
    background-color: #fff;
    padding: 20px 0;
    border-bottom: 1px solid #e0e0e0;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2688eb;
    font-weight: 700;
    font-size: 22px;
    text-decoration: none;
    white-space: nowrap;
}

.logo img {
    height: 67px;
}

/* Search Form Styles */
.search-container {
    display: flex;
    flex: 1;
    max-width: 800px;
    background-color: #f5f5f5;
    border-radius: 8px;
    overflow: visible;
    border: 1px solid #e0e0e0;
}

.search-input-group {
    display: flex;
    flex: 1;
    align-items: center;
    padding: 0 15px;
}

.search-icon {
    color: #777;
    margin-right: 10px;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 0;
    font-size: 16px;
    outline: none;
    color: #333;
}

.search-input::placeholder {
    color: #777;
}

/* Location Selector with Autocomplete */
.location-selector {
    display: flex;
    align-items: center;
    padding: 0 15px;
    background-color: #fff;
    border-left: 1px solid #e0e0e0;
    cursor: pointer;
    position: relative;
}

.location-selector:hover {
    background-color: #f9f9f9;
}

.location-icon {
    color: #777;
    margin-right: 8px;
}

.location-input {
    border: none;
    background: transparent;
    padding: 12px 0;
    font-size: 16px;
    outline: none;
    color: #333;
    width: 150px;
    min-width: 100px;
}

.location-input::placeholder {
    color: #999;
}

.location-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 300px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    margin-top: 5px;
}

.location-dropdown.active {
    display: block;
}

.location-dropdown .city-option {
    display: block;
    padding: 12px 15px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.location-dropdown .city-option:last-child {
    border-bottom: none;
}

.location-dropdown .city-option:hover {
    background-color: #f5f5f5;
    color: #2688eb;
}

.location-dropdown .city-option.all-cities {
    background-color: #e3f2fd;
    color: #1976d2;
    font-weight: 600;
    border-bottom: 1px solid #bbdefb;
}

.location-dropdown .city-option.all-cities:hover {
    background-color: #bbdefb;
    color: #1565c0;
}

.city-error {
    position: absolute;
    bottom: -30px;
    right: 0;
    background-color: #ffebee;
    color: #c62828;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    display: none;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    z-index: 1001;
    box-shadow: 0 2px 8px rgba(198, 40, 40, 0.2);
}

.city-error i {
    font-size: 14px;
}

.search-button {
    background-color: #2688eb;
    color: white;
    border: none;
    padding: 0 25px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-button:hover {
    background-color: #1a6ec0;
}

/* City Links */
.city-links {
    background-color: #fff;
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
}

.city-links .container {
    display: flex;
    gap: 20px;
}

.city-link {
    color: #2688eb;
    text-decoration: none;
    font-size: 14px;
}

.city-link.active {
    font-weight: 600;
    color: #333;
}

/* Footer */
.footer {
    background-color: #fff;
    padding: 30px 0;
    border-top: 1px solid #e0e0e0;
    margin-top: 40px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-section {
    flex: 1;
    min-width: 200px;
}

.footer-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    text-decoration: none;
    color: #777;
    font-size: 14px;
}

.footer-links a:hover {
    color: #2688eb;
}

.footer-bottom {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    color: #777;
    font-size: 14px;
}

/* Медиа-запросы для навигации */
@media (min-width: 1200px) {
    .nav-auth-link.resume-profile .nav-auth-icon,
    .nav-auth-link.responses .nav-auth-icon {
        display: none;
    }

    .nav-auth-link.resume-profile,
    .nav-auth-link.responses {
        gap: 0;
    }

    .nav-auth-link.chats .nav-auth-text,
    .nav-auth-link.notifications .nav-auth-text,
    .nav-auth-link.favorites .nav-auth-text {
        display: none;
    }

    .nav-auth-link.chats,
    .nav-auth-link.notifications,
    .nav-auth-link.favorites {
        width: 40px;
        justify-content: center;
    }

    .nav-auth-link.chats .nav-auth-icon,
    .nav-auth-link.notifications .nav-auth-icon,
    .nav-auth-link.favorites .nav-auth-icon {
        font-size: 20px;
        width: 30px;
    }

    .nav-auth-link.chats .badge-count,
    .nav-auth-link.notifications .badge-count,
    .nav-auth-link.favorites .badge-count {
        top: -6px;
        right: -6px;
    }
}

@media (max-width: 768px) {
    .nav-auth-link.resume-profile span:not(.nav-auth-icon),
    .nav-auth-link.responses span:not(.nav-auth-icon) {
        display: inline;
    }

    .nav-auth-link.resume-profile .nav-auth-icon,
    .nav-auth-link.responses .nav-auth-icon {
        display: none;
    }

    .create-resume-btn span {
        display: inline;
    }

    .create-resume-btn {
        display: none !important;
    }

    .nav-auth-link:not(.resume-profile):not(.responses) span:not(.nav-auth-icon) {
        display: none;
    }
}

@media (max-width: 1200px) {
    .nav-auth-link span:not(.nav-auth-icon) {
        display: none;
    }

    .nav-auth-link .nav-auth-icon {
        font-size: 20px;
        width: 30px;
    }

    .create-resume-btn span {
        display: none;
    }

}

@media (max-width: 992px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    .search-container {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .city-links .container {
        overflow-x: auto;
        padding-bottom: 5px;
    }

    .search-container {
        flex-direction: column;
        border-radius: 8px;
        overflow: visible;
    }

    .search-input-group {
        border-bottom: 1px solid #e0e0e0;
    }

    .location-selector {
        justify-content: center;
        border-left: none;
        border-top: 1px solid #e0e0e0;
    }

    .search-button {
        padding: 12px;
        border-radius: 0 0 8px 8px;
    }
}

@media (max-width: 576px) {
    .nav-auth-left, .nav-auth-right {
        gap: 10px;
    }

    .badge-count {
        top: -5px;
        right: -5px;
        font-size: 10px;
        min-width: 16px;
        height: 16px;
    }
}
