/**
 * Site Notice Styles
 */

/* CSS Custom Properties (set by PHP) */
:root {
    --sn-bg-color: #1a1a2e;
    --sn-text-color: #ffffff;
    --sn-accept-color: #4ade80;
    --sn-reject-color: #6b7280;
}

/* Base Popup Styles */
.sn-popup {
    position: fixed;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    box-sizing: border-box;
}

.sn-popup *,
.sn-popup *::before,
.sn-popup *::after {
    box-sizing: inherit;
}

.sn-popup-inner {
    background-color: var(--sn-bg-color);
    color: var(--sn-text-color);
    padding: 20px 24px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

/* Position Variants */
.sn-popup--bottom {
    left: 0;
    right: 0;
    bottom: 0;
    animation: sn-slide-up 0.3s ease-out;
}

.sn-popup--bottom-left {
    left: 20px;
    bottom: 20px;
    max-width: 420px;
    border-radius: 12px;
    animation: sn-slide-up 0.3s ease-out;
}

.sn-popup--bottom-left .sn-popup-inner {
    border-radius: 12px;
}

.sn-popup--bottom-right {
    right: 20px;
    bottom: 20px;
    max-width: 420px;
    border-radius: 12px;
    animation: sn-slide-up 0.3s ease-out;
}

.sn-popup--bottom-right .sn-popup-inner {
    border-radius: 12px;
}

.sn-popup--center {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.6);
    animation: sn-fade-in 0.3s ease-out;
}

.sn-popup--center .sn-popup-inner {
    max-width: 520px;
    margin: 20px;
    border-radius: 12px;
    animation: sn-scale-in 0.3s ease-out;
}

/* Hiding Animation */
.sn-popup--hiding {
    animation: sn-fade-out 0.3s ease-out forwards;
}

.sn-popup--hiding .sn-popup-inner {
    animation: sn-slide-down 0.3s ease-out forwards;
}

/* Content Styles */
.sn-content {
    margin-bottom: 16px;
}

.sn-title {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--sn-text-color);
}

.sn-message {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
}

.sn-link {
    color: var(--sn-accept-color);
    text-decoration: underline;
}

.sn-link:hover {
    opacity: 0.8;
}

/* Button Styles */
.sn-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.sn-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
}

.sn-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.sn-btn:active {
    transform: translateY(0);
}

.sn-btn:focus {
    outline: 2px solid var(--sn-accept-color);
    outline-offset: 2px;
}

.sn-btn-accept {
    background-color: var(--sn-accept-color);
    color: var(--white-1);
}

.sn-btn-reject {
    background-color: var(--sn-reject-color);
    color: #fff;
}

.sn-btn-settings {
    background-color: transparent;
    color: var(--sn-text-color);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.sn-btn-settings:hover {
    border-color: rgba(255, 255, 255, 0.5);
}

.sn-btn-save {
    background-color: var(--sn-accept-color);
    color: var(--white-1);
    margin-top: 12px;
    width: 100%;
}

/* Settings Panel */
.sn-settings-panel {
    margin: 16px 0;
    padding: 16px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.sn-settings-header {
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 15px;
}

.sn-option {
    margin-bottom: 12px;
}

.sn-option:last-of-type {
    margin-bottom: 0;
}

.sn-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.sn-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--sn-accept-color);
}

.sn-checkbox-label input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.sn-checkbox-text {
    display: flex;
    flex-direction: column;
}

.sn-checkbox-text strong {
    font-size: 14px;
}

.sn-checkbox-text small {
    font-size: 12px;
    opacity: 0.7;
    margin-top: 2px;
}

/* Animations */
@keyframes sn-slide-up {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes sn-slide-down {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

@keyframes sn-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes sn-fade-out {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes sn-scale-in {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 600px) {
    .sn-popup--bottom-left,
    .sn-popup--bottom-right {
        left: 10px;
        right: 10px;
        max-width: none;
    }

    .sn-popup-inner {
        padding: 16px;
    }

    .sn-buttons {
        flex-direction: column;
    }

    .sn-btn {
        width: 100%;
        text-align: center;
    }

    .sn-btn-settings {
        order: 3;
    }
}

/* Print - Hide popup */
@media print {
    .sn-popup {
        display: none !important;
    }
}
