/**
 * Frontend styles for WP Bilingual Translation
 */

/* Language Toggle Widget */
.wp-bilingual-language-toggle {
    position: relative;
    display: inline-block;
    z-index: 1000;
}

.wp-bilingual-toggle-btn {
    background: #0060aa;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    border-radius: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s ease;
    min-width: 80px;
    justify-content: center;
    outline: none;
    height: 38px;
    box-sizing: border-box;
}

.wp-bilingual-toggle-btn:focus {
    outline: none;
    box-shadow: none;
}

.wp-bilingual-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.wp-bilingual-toggle-btn .chevron {
    font-size: 14px;
    margin-left: 4px;
    line-height: 0.8;
    vertical-align: top;
    position: relative;
    top: -2px;
}

.wp-bilingual-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-top: none;
    border-radius: 0;
    box-shadow: none;
    width: 100%;
    overflow: hidden;
}

.wp-bilingual-lang-option {
    display: block;
    padding: 8px 16px;
    color: #ffffff;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s ease;
    text-align: center;
    background: #0060aa;
    border: none;
    box-sizing: border-box;
    height: 38px;
    line-height: 22px;
}

.wp-bilingual-lang-option:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    text-decoration: none !important;
}

.wp-bilingual-lang-option:focus {
    outline: none;
    text-decoration: none !important;
}

/* Cookie Consent Banner */
.cookie-consent-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: #f8f9fa;
    color: #333333;
    padding: 20px 60px 20px 24px;
    z-index: 9999;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease, bottom 0.4s ease;
}

.cookie-consent-banner.show {
    display: block;
    opacity: 1;
}

.cookie-consent-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    gap: 24px;
    margin-right: 10px;
}

.cookie-consent-text {
    flex: 1;
    font-size: 15px;
    line-height: 1.6;
    color: #333333;
}

.cookie-consent-buttons {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.cookie-consent-accept,
.cookie-consent-policy {
    background: #1a1a2e;
    color: #ffffff;
    border: none;
    padding: 12px 28px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
}

.cookie-consent-accept:hover,
.cookie-consent-policy:hover {
    background: #2d2d44;
    transform: translateY(-1px);
    color: #ffffff;
}

.cookie-consent-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: #999999;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
    width: 24px;
    height: 24px;
}

.cookie-consent-close:hover {
    color: #666666;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .wp-bilingual-language-toggle {
        margin-left: 10px;
    }

    .wp-bilingual-toggle-btn {
        padding: 6px 12px;
        font-size: 14px;
        height: 38px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .wp-bilingual-lang-option {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        height: 38px;
        padding: 0 12px;
        line-height: normal;
    }

    .cookie-consent-banner {
        bottom: 10px;
        left: 10px;
        right: 10px;
        padding: 20px 50px 20px 20px;
    }

    .cookie-consent-close {
        top: 15px;
        right: 15px;
        font-size: 20px;
        width: 20px;
        height: 20px;
    }

    .cookie-consent-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .cookie-consent-buttons {
        width: 100%;
        flex-direction: column;
    }

    .cookie-consent-accept,
    .cookie-consent-policy {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .cookie-consent-text {
        font-size: 14px;
    }

    .cookie-consent-accept,
    .cookie-consent-policy {
        font-size: 13px;
        padding: 10px 20px;
    }
}

/* Animation for banner */
@keyframes slideUp {
    from {
        bottom: -200px;
        opacity: 0;
    }
    to {
        bottom: 20px;
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        bottom: 20px;
        opacity: 1;
    }
    to {
        bottom: -200px;
        opacity: 0;
    }
}

.cookie-consent-banner.animating-in {
    animation: slideUp 0.4s ease-out forwards;
}

.cookie-consent-banner.animating-out {
    animation: slideDown 0.4s ease-out forwards;
}
