/**
 * Layout CSS - OpenDataCar
 * Стилі для основного layout (header, footer, modals, dropdowns)
 * Винесено з views/layouts/main.php для покращення продуктивності
 */

/* ==========================================================================
   Cookie Banner
   ========================================================================== */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 15px;
    z-index: 1000;
    display: none;
    text-align: center;
}

.cookie-banner-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.cookie-banner-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.cookie-banner-content a {
    color: #007bff;
    text-decoration: underline;
}

.cookie-banner-buttons {
    display: flex;
    gap: 10px;
}

@media (max-width: 600px) {
    .cookie-banner-content {
        flex-direction: column;
        text-align: center;
    }
}

/* ==========================================================================
   Language Dropdown
   ========================================================================== */

.language-dropdown {
    position: relative;
    display: inline-block;
    margin-right: 5px;
}

.language-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    backdrop-filter: blur(20px);
    transition: all 0.2s ease;
}

.language-dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(2, 133, 255, 0.3);
}

.language-dropdown.open .language-dropdown-toggle {
    background: rgba(255, 255, 255, 0.3);
    border-color: #0285ff;
}

.lang-arrow {
    transition: transform 0.2s ease;
}

.language-dropdown.open .lang-arrow {
    transform: rotate(180deg);
}

.language-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 140px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
    overflow: hidden;
}

.language-dropdown.open .language-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    text-decoration: none;
    color: #333;
    font-size: 13px;
    transition: background 0.15s ease;
}

.lang-dropdown-item:hover {
    background: #f5f7fa;
}

.lang-dropdown-item.active {
    background: linear-gradient(135deg, #02a9ff 0%, #0285ff 100%);
    color: #fff;
}

.lang-code {
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    min-width: 24px;
}

.lang-name {
    font-weight: 400;
}

/* ==========================================================================
   Services Dropdown
   ========================================================================== */

.services-dropdown {
    position: relative;
    display: inline-block;
    margin-right: 5px;
}

.services-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #333435;
    transition: all 0.2s ease;
}

.services-dropdown-toggle:hover {
    color: #0285ff;
}

.services-dropdown.open .services-dropdown-toggle {
    color: #0285ff;
}

.services-arrow {
    transition: transform 0.2s ease;
}

.services-dropdown.open .services-arrow {
    transform: rotate(180deg);
}

.services-dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    min-width: 280px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    z-index: 1000;
    overflow: hidden;
    padding: 8px;
}

.services-dropdown.open .services-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.services-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    text-decoration: none;
    color: #333;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.services-item:hover {
    background: #f5f7fa;
}

.services-item:hover .services-icon {
    background: linear-gradient(135deg, #02a9ff 0%, #0285ff 100%);
    color: #fff;
}

.services-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f4f8;
    border-radius: 10px;
    color: #64748b;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.services-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.services-title {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

.services-desc {
    font-size: 12px;
    color: #64748b;
}

/* ==========================================================================
   Language Switcher (Mobile)
   ========================================================================== */

.language-switcher {
    display: inline-flex;
    gap: 2px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 100px;
    padding: 2px;
    margin-right: 5px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.language-switcher-mobile {
    margin: 10px auto;
    width: fit-content;
    background: rgba(255, 255, 255, 0.9);
}

.lang-btn {
    padding: 4px 10px;
    background: transparent;
    border: none;
    color: #666;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    border-radius: 100px;
    transition: all 0.25s ease;
    text-decoration: none;
    text-transform: uppercase;
}

.lang-btn:hover {
    color: #0285ff;
    background: rgba(2, 133, 255, 0.1);
}

.lang-btn.active {
    color: #fff;
    background: linear-gradient(135deg, #02a9ff 0%, #0285ff 100%);
    box-shadow: 0 2px 8px rgba(2, 133, 255, 0.3);
}

/* ==========================================================================
   Mobile Services Section
   ========================================================================== */

.mobile-services-section {
    padding: 12px 16px !important;
}

.mobile-services-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.mobile-services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.mobile-service-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #f8fafc;
    border-radius: 10px;
    text-decoration: none;
    color: #334155;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.mobile-service-item:hover,
.mobile-service-item:active {
    background: #e2e8f0;
    color: #0285ff;
}

.mobile-service-item svg {
    color: #64748b;
    flex-shrink: 0;
}

.header-login-mobile {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #0285ff !important;
    font-weight: 600 !important;
}

.header-login-mobile svg {
    color: #0285ff;
}

/* ==========================================================================
   Header Navigation
   ========================================================================== */

.header-nav-desktop {
    gap: 15px;
}

.header-nav-desktop > a {
    white-space: nowrap;
    text-decoration: none;
    font-weight: 500;
    color: #333435;
    transition: color 0.3s ease, transform 0.2s ease;
}

.header-nav-desktop > a:hover {
    color: #0285ff !important;
    transform: translateY(-1px);
}

.header-nav-desktop > a:active {
    transform: translateY(0);
}

/* ==========================================================================
   Header Login Button
   ========================================================================== */

.header-btn-login {
    display: flex;
    align-items: center;
    padding: 6px 16px;
    margin-left: 0;
    background: linear-gradient(135deg, #02a9ff 0%, #0285ff 100%);
    border-radius: 100px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(2, 133, 255, 0.25);
    filter: drop-shadow(0px 2px 6px rgba(2, 133, 255, 0.2));
}

.header-btn-login svg {
    margin-right: 6px;
}

.header-btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(2, 133, 255, 0.35);
    filter: drop-shadow(0px 4px 10px rgba(2, 133, 255, 0.3));
    color: #fff;
}

.header-btn-login:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(2, 133, 255, 0.2);
}

/* ==========================================================================
   Currency Switcher
   ========================================================================== */

.currency-switcher {
    display: inline-flex;
    gap: 0;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 100px;
    padding: 2px;
    margin-left: 10px;
    margin-right: 10px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
}

.currency-switcher-footer {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
}

.currency-switcher-footer .currency-btn {
    color: rgba(255, 255, 255, 0.6);
}

.currency-switcher-footer .currency-btn:hover {
    color: rgba(255, 255, 255, 0.9);
}

.currency-switcher-footer .currency-btn.active {
    color: #fff;
}

.currency-switcher-footer .currency-slider-bg {
    background: linear-gradient(135deg, #02a9ff 0%, #0285ff 100%);
}

.currency-slider-bg {
    position: absolute;
    top: 2px;
    left: 2px;
    width: calc(50% - 2px);
    height: calc(100% - 4px);
    background: linear-gradient(135deg, #02a9ff 0%, #0285ff 100%);
    border-radius: 100px;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 10px rgba(2, 133, 255, 0.3);
    filter: drop-shadow(0px 2px 6px rgba(2, 133, 255, 0.25));
    z-index: 0;
}

.currency-switcher[data-active="UAH"] .currency-slider-bg {
    transform: translateX(100%);
}

.currency-btn {
    padding: 4px 12px;
    background: transparent;
    border: none;
    color: #666;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    border-radius: 100px;
    transition: color 0.25s ease;
    min-width: 40px;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

.currency-btn:hover {
    color: #0285ff;
}

.currency-btn.active {
    color: #fff;
}

@media (max-width: 768px) {
    .currency-btn {
        padding: 6px 16px;
        font-size: 12px;
        min-width: 50px;
    }
}

.price-usd::after {
    content: ' $';
}

/* ==========================================================================
   Contact Modal - Inline Style Replacements
   ========================================================================== */

.contact-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-narrow {
    max-width: 460px;
}

.modal-callback-block {
    background: linear-gradient(135deg, #c7c7c78a 0%, #2a3a543b 100%);
    border-radius: 10px;
    padding: 20px;
    color: #fff;
}

.modal-callback-block p {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
}

.modal-callback-block .header-btn {
    font-size: 16px;
    padding: 15px;
}

/* ==========================================================================
   Footer Styles
   ========================================================================== */

.footer-no-margin {
    margin-top: 0;
}

.footer-mission-text {
    margin-left: 10px;
    color: #999;
    font-size: 12px;
    max-width: 200px;
    text-align: left;
}

/* Note: Footer Bottom styles are in base.css */

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.btn {
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.btn-blue {
    background: #007bff;
    color: #fff;
    border: none;
}

.btn-dark {
    background: #333;
    color: #fff;
    border: none;
}
