/**
 * Consent Snackbar Styles
 *
 * @package Comments_Everywhere
 */

.ce-snackbar {
    /* CSS custom properties set by JS (_applyStyles) from Elementor controls */
    --ce-snackbar-bg:      #323232;
    --ce-snackbar-text:    #ffffff;
    --ce-snackbar-accept:  #4CAF50;
    --ce-snackbar-decline: #f44336;

    position: fixed;
    bottom: -100%;
    left: 50%;
    transform: translateX(-50%);
    max-width: 600px;
    width: calc(100% - 32px);
    background-color: var(--ce-snackbar-bg, #323232);
    color: var(--ce-snackbar-text, #ffffff);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 999999;
    transition: bottom 0.3s ease-out;
    padding: 20px;
    box-sizing: border-box;
}

.ce-snackbar--visible {
    bottom: 20px;
}

.ce-snackbar--hiding {
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

/* Content */
.ce-snackbar__content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Header */
.ce-snackbar__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

/* Title */
.ce-snackbar__title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

/* Language Switcher */
.ce-snackbar__language-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.ce-snackbar__language {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 32px;
}

.ce-snackbar__language:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.ce-snackbar__language:disabled,
.ce-snackbar__language--active {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
    cursor: default;
}

.ce-snackbar__language-separator {
    color: rgba(255, 255, 255, 0.3);
    font-size: 12px;
}

/* Message */
.ce-snackbar__message {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--ce-snackbar-text, #ffffff);
    opacity: 0.9;
}

/* Actions */
.ce-snackbar__actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.ce-snackbar__button {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #ffffff;
}

.ce-snackbar__button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.ce-snackbar__button:active {
    transform: translateY(0);
}

.ce-snackbar-accept {
    background-color: var(--ce-snackbar-accept, #4CAF50);
}

.ce-snackbar-accept:hover {
    background-color: var(--ce-snackbar-accept, #4CAF50);
    filter: brightness(0.9);
}

.ce-snackbar-decline {
    background-color: var(--ce-snackbar-decline, #f44336);
}

.ce-snackbar-decline:hover {
    background-color: var(--ce-snackbar-decline, #f44336);
    filter: brightness(0.9);
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .ce-snackbar {
        bottom: -100%;
        left: 16px;
        right: 16px;
        width: auto;
        transform: none;
        padding: 16px;
        max-width: none;
    }

    .ce-snackbar--visible {
        bottom: 16px;
    }

    .ce-snackbar__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .ce-snackbar__title {
        font-size: 16px;
    }

    .ce-snackbar__message {
        font-size: 13px;
    }

    .ce-snackbar__actions {
        flex-direction: column;
        width: 100%;
    }

    .ce-snackbar__button {
        width: 100%;
    }
}

/* Tablet */
@media (min-width: 641px) and (max-width: 1024px) {
    .ce-snackbar {
        max-width: 500px;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .ce-snackbar {
        transition: none;
    }

    .ce-snackbar__button:hover {
        transform: none;
    }

    .ce-snackbar__button:active {
        transform: none;
    }
}

/* Dark Mode Support – only applies when no custom color is set via Elementor */
@media (prefers-color-scheme: dark) {
    .ce-snackbar {
        --ce-snackbar-bg: #1e1e1e;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .ce-snackbar {
        border: 2px solid #ffffff;
    }

    .ce-snackbar__button {
        border: 2px solid #ffffff;
    }
}

/* RTL Support */
[dir="rtl"] .ce-snackbar__header {
    flex-direction: row-reverse;
}

[dir="rtl"] .ce-snackbar__actions {
    flex-direction: row-reverse;
}

/* Print - Hide snackbar */
@media print {
    .ce-snackbar {
        display: none !important;
    }
}
