/* Solenis Widgets Styles */

.popup-modal {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
}

.popup-modal.show {
    display: flex;
}

.popup-modal-content {
    position: relative;
    width: 100%;
    max-width: 45rem;
    margin: 1rem;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: fadeInScale 0.3s ease-out;
}

.popup-modal.hidden .popup-modal-content {
    animation: fadeOutScale 0.2s ease-in;
}

.popup-modal-desktop-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: none;
}

.popup-modal-overlay {
    position: relative;
    z-index: 10;
    padding: 2rem;
    color: white;
    min-height: 25rem; /* 400px */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: white;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    z-index: 20;
    transition: transform 0.2s ease, color 0.2s ease;
}

.popup-close:hover {
    color: #d1d5db; /* gray-300 */
    transform: scale(1.1);
}


.popup-heading {
    font-size: 2.25rem; /* 36px */
    font-weight: bold;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.popup-content-row {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.popup-content {
    font-size: 1.125rem; /* 18px */
    color: white;
    flex: 1;
}

.popup-content p {
    color: white;
    margin-bottom: 1rem;
}

.popup-content p:last-child {
    margin-bottom: 0;
}

.popup-button-wrapper {
    flex-shrink: 0;
}

.popup-button {
    display: inline-block;
    background-color: white;
    color: #2563eb; /* blue-600 */
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 1.125rem;
    text-decoration: none;
    transition: background-color 0.2s ease;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.popup-button:hover {
    background-color: #f3f4f6; /* gray-100 */
    text-decoration: none;
}

/* Animations */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeOutScale {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

/* Responsive Design */
@media (min-width: 768px) {
    .popup-modal-desktop-bg {
        display: block;
    }
    
    .popup-modal-overlay {
        padding: 3rem;
        min-height: 31.25rem; /* 500px */
    }
    
    .popup-close {
        top: 1.5rem;
        right: 1.5rem;
    }
    
    .popup-heading {
        font-size: 3rem; /* 48px */
        margin-bottom: 2rem;
    }
    
    .popup-content-row {
        flex-direction: row;
        align-items: end;
        justify-content: space-between;
        gap: 2rem;
    }
    
    .popup-content {
        font-size: 1.25rem; /* 20px */
    }
    
    .popup-button {
        padding: 1rem 2.5rem;
    }
}

@media (min-width: 1024px) {
    .popup-modal-overlay {
        padding: 4rem;
    }
    
    .popup-heading {
        font-size: 3.75rem; /* 60px */
    }
    
    .popup-content {
        font-size: 1.5rem; /* 24px */
    }
}

@media (min-width: 1280px) {
    .popup-modal-overlay {
        padding: 5rem;
    }
    
    .popup-heading {
        font-size: 4.5rem; /* 72px */
    }
}

/* Accessibility */
.popup-modal[aria-hidden="true"] {
    display: none !important;
}

/* Prevent body scroll when modal is open */
body.popup-modal-open {
    overflow: hidden;
}
