/**
 * SayWOW Conditional Content Styles
 */

/* Modal Overlay */
.sw-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99998;
    cursor: pointer;
}

/* Modal */
.sw-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 99999;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: sw-modal-fade-in 0.3s ease;
}

@keyframes sw-modal-fade-in {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.sw-modal-content {
    position: relative;
    padding: 2em;
}

.sw-modal-close {
    position: absolute;
    top: 0.5em;
    right: 0.5em;
    background: none;
    border: none;
    font-size: 2em;
    line-height: 1;
    cursor: pointer;
    color: #999;
    width: 1.5em;
    height: 1.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    z-index: 10;
}

.sw-modal-close:hover {
    color: #333;
}

/* Prevent body scroll when modal is open */
body.sw-modal-open {
    overflow: hidden;
}

/* Bars (Top/Bottom) */
.sw-bar {
    width: 100%;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    z-index: 9999;
    animation: sw-bar-slide-in 0.3s ease;
}

.sw-bar-top {
    top: 0;
    border-top: none;
    border-left: none;
    border-right: none;
}

.sw-bar-bottom {
    bottom: 0;
    border-bottom: none;
    border-left: none;
    border-right: none;
}

.sw-bar-sticky {
    position: fixed;
}

@keyframes sw-bar-slide-in {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

.sw-bar-bottom {
    animation: sw-bar-slide-in-bottom 0.3s ease;
}

@keyframes sw-bar-slide-in-bottom {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.sw-bar-content {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1em 2em;
    position: relative;
    text-align: center;
}

.sw-bar-close {
    position: absolute;
    right: 1em;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.5em;
    line-height: 1;
    cursor: pointer;
    color: #999;
    width: 1.5em;
    height: 1.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.sw-bar-close:hover {
    color: #333;
}

/* Generic Trigger */
.sw-trigger {
    animation: sw-fade-in 0.3s ease;
}

@keyframes sw-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sw-modal {
        max-width: 95%;
        max-height: 95vh;
    }
    
    .sw-modal-content {
        padding: 1.5em;
    }
    
    .sw-bar-content {
        padding: 0.75em 1em;
        padding-right: 3em;
        text-align: left;
    }
    
    .sw-bar-close {
        right: 0.5em;
    }
}

/* Theme Variations */

/* Dark Modal */
.sw-modal.sw-modal-dark .sw-modal-content {
    background: #1a1a1a;
    color: #fff;
}

.sw-modal.sw-modal-dark .sw-modal-close {
    color: #ccc;
}

.sw-modal.sw-modal-dark .sw-modal-close:hover {
    color: #fff;
}

/* Large Modal */
.sw-modal.sw-modal-large {
    max-width: 1200px;
    width: 90%;
}

/* Small Modal */
.sw-modal.sw-modal-small {
    max-width: 400px;
}

/* Success Bar */
.sw-bar.sw-bar-success {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

/* Warning Bar */
.sw-bar.sw-bar-warning {
    background: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

/* Danger Bar */
.sw-bar.sw-bar-danger {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* Info Bar */
.sw-bar.sw-bar-info {
    background: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* Primary Bar */
.sw-bar.sw-bar-primary {
    background: #007bff;
    border-color: #0056b3;
    color: #fff;
}

.sw-bar.sw-bar-primary .sw-bar-close {
    color: rgba(255, 255, 255, 0.7);
}

.sw-bar.sw-bar-primary .sw-bar-close:hover {
    color: #fff;
}
