/* ============================================
   COOKIE BANNER - Base Styles
   ============================================ */

#wpml-cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.6;
}

.banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.banner-text {
    flex: 1;
    min-width: 280px;
}

.banner-text p {
    margin: 0 0 10px 0;
}

.banner-text p:last-child {
    margin-bottom: 0;
}

.banner-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.cookie-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.cookie-btn:active {
    transform: translateY(0);
}

.accept-btn {
    background: linear-gradient(135deg, #27ae60 0%, #219a52 100%);
    color: white;
}

.accept-btn:hover {
    background: linear-gradient(135deg, #219a52 0%, #1e8449 100%);
}

.decline-btn {
    background-color: transparent;
    color: currentColor;
    border: 2px solid currentColor;
    box-shadow: none;
}

.decline-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.options-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.options-btn:hover {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
}

.secondary-btn {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
}

.secondary-btn:hover {
    background: linear-gradient(135deg, #7f8c8d 0%, #6c7a7b 100%);
}

/* ============================================
   MODAL - Base Styles
   ============================================ */

.wpml-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wpml-modal.wpml-modal-show {
    opacity: 1;
}

.wpml-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.wpml-modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.wpml-modal.wpml-modal-show .wpml-modal-content {
    transform: scale(1);
}

.wpml-modal-header {
    padding: 25px 30px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wpml-modal-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

.wpml-modal-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.wpml-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.wpml-modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.wpml-modal-intro {
    font-size: 15px;
    color: #555;
    margin: 0 0 25px 0;
    line-height: 1.6;
}

.wpml-consent-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.wpml-consent-item:hover {
    border-color: #3498db;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.1);
}

.wpml-consent-item.wpml-consent-necessary {
    background: #e8f5e9;
    border-color: #c8e6c9;
}

.wpml-consent-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.wpml-consent-header > div {
    flex: 1;
}

.wpml-consent-header h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #2c3e50;
    font-weight: 600;
}

.wpml-consent-description {
    margin: 0;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

/* ============================================
   TOGGLE SWITCH - Modern iOS Style
   ============================================ */

.wpml-toggle {
    position: relative;
    display: inline-block;
    width: 54px;
    height: 28px;
    flex-shrink: 0;
}

.wpml-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.wpml-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 28px;
}

.wpml-toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.wpml-toggle input:checked + .wpml-toggle-slider {
    background: linear-gradient(135deg, #27ae60 0%, #219a52 100%);
}

.wpml-toggle input:focus + .wpml-toggle-slider {
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.2);
}

.wpml-toggle input:checked + .wpml-toggle-slider:before {
    transform: translateX(26px);
}

.wpml-toggle.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.wpml-toggle.disabled .wpml-toggle-slider {
    cursor: not-allowed;
}

/* ============================================
   MODAL FOOTER
   ============================================ */

.wpml-modal-footer {
    padding: 20px 30px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.wpml-modal-footer .cookie-btn {
    flex: 1;
    min-width: 140px;
    text-align: center;
}

/* ============================================
   BANNER ANIMATIONS
   ============================================ */

#wpml-cookie-banner.slide-up {
    animation: slideUp 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

#wpml-cookie-banner.slide-down {
    animation: slideDown 0.3s ease-out forwards;
}

@keyframes slideDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

/* ============================================
   RESPONSIVE - TABLET
   ============================================ */

@media (max-width: 768px) {
    #wpml-cookie-banner {
        padding: 15px;
    }

    .banner-content {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .banner-text {
        min-width: auto;
        text-align: center;
    }

    .banner-actions {
        justify-content: center;
        width: 100%;
    }

    .cookie-btn {
        flex: 1;
        min-width: 100px;
        padding: 10px 15px;
        font-size: 13px;
    }

    .wpml-modal-content {
        max-width: 95%;
        max-height: 85vh;
    }

    .wpml-modal-header {
        padding: 20px;
    }

    .wpml-modal-header h2 {
        font-size: 19px;
    }

    .wpml-modal-body {
        padding: 20px;
    }

    .wpml-consent-item {
        padding: 15px;
    }

    .wpml-modal-footer {
        padding: 15px 20px;
        flex-direction: column;
    }

    .wpml-modal-footer .cookie-btn {
        width: 100%;
        min-width: auto;
    }
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */

@media (max-width: 480px) {
    #wpml-cookie-banner {
        padding: 12px;
    }

    .banner-content {
        gap: 12px;
    }

    .banner-text {
        font-size: 13px;
    }

    .banner-actions {
        flex-direction: column;
        gap: 8px;
    }

    .cookie-btn {
        width: 100%;
        padding: 12px 16px;
        font-size: 14px;
    }

    .wpml-modal {
        padding: 10px;
    }

    .wpml-modal-content {
        max-width: 100%;
        max-height: 90vh;
        border-radius: 8px;
    }

    .wpml-modal-header {
        padding: 15px;
    }

    .wpml-modal-header h2 {
        font-size: 17px;
    }

    .wpml-modal-close {
        width: 32px;
        height: 32px;
        font-size: 28px;
    }

    .wpml-modal-body {
        padding: 15px;
    }

    .wpml-modal-intro {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .wpml-consent-item {
        padding: 12px;
        margin-bottom: 12px;
    }

    .wpml-consent-header {
        flex-direction: column;
        gap: 12px;
    }

    .wpml-consent-header h3 {
        font-size: 15px;
    }

    .wpml-consent-description {
        font-size: 12px;
    }

    .wpml-toggle {
        align-self: flex-start;
    }

    .wpml-modal-footer {
        padding: 12px 15px;
        gap: 8px;
    }

    .wpml-modal-footer .cookie-btn {
        padding: 12px;
        font-size: 13px;
    }
}

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================ */

.cookie-btn:focus,
.wpml-toggle input:focus + .wpml-toggle-slider,
.wpml-modal-close:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .cookie-btn,
    .wpml-modal,
    .wpml-modal-content,
    .wpml-toggle-slider,
    .wpml-toggle-slider:before,
    #wpml-cookie-banner {
        animation: none !important;
        transition: none !important;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    #wpml-cookie-banner,
    .wpml-modal,
    #wpml-change-consent {
        display: none !important;
    }
}
