/*
  File: popup_modal.css
  Purpose: Styles for the dynamic content modal popup.
*/

/* Modal Overlay: Dims the background */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Container: The main popup box */
.modal-container {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    max-width: 90%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

/* Modal Content Area: Where the external content is loaded */
.modal-content {
    padding: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* This will be the direct child of modal-content, loaded from ajax */
.modal-content > div {
    max-width: 100%; /* Ensure content doesn't overflow */
}

.modal-content img {
    max-width: 100%;
    height: auto; /* Maintain aspect ratio */
    display: block;
    margin: 0 auto; /* Center images */
}

/* Modal Footer: Contains controls like close button and checkbox */
.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background-color: #f1f1f1;
    border-top: 1px solid #e5e5e5;
}

/* "Don't show today" checkbox style */
.modal-footer .dont-show-today {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #555;
}

.modal-footer .dont-show-today input[type="checkbox"] {
    margin-right: 8px;
    width: 16px;
    height: 16px;
}

/* Close Button Style */
.modal-footer .close-modal-btn {
    padding: 8px 20px;
    border: none;
    background-color: #333;
    color: white;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.modal-footer .close-modal-btn:hover {
    background-color: #555;
}
