/**
 * Custom Popup Styling for Homepage
 * Matches the Springhill Medical Center / United Healthcare design
 */

/* Main popup modal styling */
div[class*="ays-pb-modal_"].ays-pb-modal,
div[class*="ays-pb-modal_"].ays-pb-modal-macos,
div[class*="ays-pb-modal_"].ays_window,
div[class*="ays-pb-modal_"].ays_template_window {
    border: none !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
    border-radius: 12px !important;
    font-family: Open Sans, sans-serif !important;
    background: #ffffff !important;
    max-width: 900px !important;
}

/* Popup header/title bar styling */
.ays_window .ays_topBar,
.ays_template_window header.ays_template_head,
.ays_minimal_window .ays_minimal_head {
    background: transparent !important;
    border-bottom: none !important;
}

/* Popup title text - "Welcome!" */
.ays_window .ays_topBar h2,
.ays_template_window header.ays_template_head h2,
.ays_minimal_window .ays_minimal_head h2,
.ays-pb-modal h1,
.ays-pb-modal h2 {
    color: #2C3E50 !important;
    font-family: "Playfair Display", Georgia, serif !important;
    font-weight: 700 !important;
    font-size: 42px !important;
    text-shadow: none !important;
    margin-bottom: 20px !important;
    text-align: center !important;
}

/* Subtitle text - teal colored */
.ays-pb-modal h3,
.ays_window h3 {
    color: #4A9B9F !important;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
    font-weight: 600 !important;
    font-size: 28px !important;
    line-height: 1.4 !important;
    margin-bottom: 25px !important;
    text-align: center !important;
    letter-spacing: normal !important;
}

/* Close button styling - circular X in top right */
.ays_window .ays_topBar .ays_close {
    background-color: transparent !important;
    border: 2px solid #4A9B9F !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.ays_window .ays_topBar .ays_hide {
    display: none !important;
}

.ays_window .ays_topBar .ays_fullScreen {
    display: none !important;
}

/* Close button on other modal types */
.ays-pb-modal-close,
.ays-pb-close-button,
.ays_pb_close_button {
    color: #424242 !important;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.ays-pb-modal-close:hover,
.ays-pb-close-button:hover,
.ays_pb_close_button:hover {
    opacity: 1;
    color: #71a100 !important;
}

/* Popup content area */
.ays_window .ays_text,
.ays-pb-modal .ays_pb_description,
.ays_template_window .ays_template_content,
.ays_minimal_window .ays_minimal_main {
    background: transparent !important;
    color: #333333 !important;
    font-size: 18px !important;
    line-height: 1.6 !important;
    text-align: center !important;
    padding: 40px 50px !important;
    letter-spacing: normal !important;
}

/* Links inside popup */
.ays-pb-modal a:not(.btn):not(.btn-primary):not(.btn-secondary),
.ays_window a:not(.btn):not(.btn-primary):not(.btn-secondary) {
    color: #4A9B9F !important;
    text-decoration: none !important;
    font-weight: 500 !important;
}

.ays-pb-modal a:not(.btn):not(.btn-primary):not(.btn-secondary):hover,
.ays_window a:not(.btn):not(.btn-primary):not(.btn-secondary):hover {
    color: #3d8286 !important;
    text-decoration: underline !important;
}

/* Buttons inside popup - Primary filled button (LEARN MORE) */
.ays-pb-modal .btn,
.ays-pb-modal button,
.ays-pb-modal input[type="submit"],
.ays_window .btn,
.ays_window button,
.ays_window input[type="submit"],
.ays_pb_button,
.ays-pb-modal .btn-primary {
    background-color: #4A9B9F !important;
    border: 2px solid #4A9B9F !important;
    color: #FFFFFF !important;
    padding: 14px 40px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    margin: 10px 8px !important;
    display: inline-block !important;
}

.ays-pb-modal .btn:hover,
.ays-pb-modal button:hover,
.ays-pb-modal input[type="submit"]:hover,
.ays_window .btn:hover,
.ays_window button:hover,
.ays_window input[type="submit"]:hover,
.ays_pb_button:hover,
.ays-pb-modal .btn-primary:hover {
    background-color: #3d8286 !important;
    border-color: #3d8286 !important;
    text-decoration: none !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 155, 159, 0.3) !important;
}

/* Secondary outlined button (CLOSE) */
.ays-pb-modal .btn-secondary,
.ays-pb-modal button.close-btn,
.ays_window button.close-btn {
    background-color: transparent !important;
    border: 2px solid #4A9B9F !important;
    color: #4A9B9F !important;
    padding: 14px 40px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    margin: 10px 8px !important;
    display: inline-block !important;
}

.ays-pb-modal .btn-secondary:hover,
.ays-pb-modal button.close-btn:hover,
.ays_window button.close-btn:hover {
    background-color: #f0f9f9 !important;
    border-color: #3d8286 !important;
    color: #3d8286 !important;
    text-decoration: none !important;
    transform: translateY(-2px);
}

/* Input fields inside popup */
.ays-pb-modal input[type="text"],
.ays-pb-modal input[type="email"],
.ays-pb-modal input[type="tel"],
.ays-pb-modal textarea,
.ays_window input[type="text"],
.ays_window input[type="email"],
.ays_window input[type="tel"],
.ays_window textarea {
    border: 2px solid #b8dfe2 !important;
    padding: 8px 14px !important;
    font-size: 15px !important;
    color: #006b7d !important;
    background-color: #fff !important;
    border-radius: 4px !important;
    transition: border-color 0.3s ease !important;
}

.ays-pb-modal input:focus,
.ays-pb-modal textarea:focus,
.ays_window input:focus,
.ays_window textarea:focus {
    border-color: #006b7d !important;
    outline: none !important;
    box-shadow: 0 0 8px rgba(0, 107, 125, 0.3) !important;
}

/* Popup overlay/backdrop */
.ays-pb-modal-backdrop,
.ays-pb-modal-overlay,
.ays-pb-modals {
    background-color: rgba(44, 62, 80, 0.6) !important;
}

/* Popup footer */
.ays_template_window footer.ays_template_footer {
    background-color: transparent !important;
    border-top: none !important;
    padding: 15px !important;
}

/* Remove header bar for cleaner look */
.ays_window .ays_topBar,
.ays_template_window header.ays_template_head,
.ays_minimal_window .ays_minimal_head {
    background: transparent !important;
    border-bottom: none !important;
    position: relative !important;
    padding: 0 !important;
    height: auto !important;
    min-height: 0 !important;
}

/* Headings inside popup */
.ays-pb-modal h4,
.ays-pb-modal h5,
.ays-pb-modal h6,
.ays_window h4,
.ays_window h5,
.ays_window h6 {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
    font-weight: 500 !important;
    color: #2C3E50 !important;
    margin-bottom: 15px !important;
}

/* Notification style popup */
div[class*="ays-pb-modal_"].ays_notification_window {
    border-left: 4px solid #4A9B9F !important;
    background: #ffffff !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15) !important;
}

/* Loading spinner - match theme colors */
.ays-pb-spinner,
.ays-pb-loading {
    border-color: #4A9B9F !important;
    border-top-color: transparent !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    div[class*="ays-pb-modal_"].ays-pb-modal,
    div[class*="ays-pb-modal_"].ays_window {
        margin: 20px !important;
        max-width: calc(100% - 40px) !important;
    }
    
    .ays-pb-modal h1,
    .ays-pb-modal h2 {
        font-size: 32px !important;
    }
    
    .ays-pb-modal h3,
    .ays_window h3 {
        font-size: 22px !important;
    }
    
    .ays-pb-modal .ays_pb_description,
    .ays_window .ays_text {
        padding: 30px 25px !important;
    }
    
    .ays-pb-modal .btn,
    .ays-pb-modal button,
    .ays_window .btn,
    .ays_window button {
        padding: 12px 30px !important;
        font-size: 13px !important;
        display: block !important;
        width: 100% !important;
        max-width: 300px !important;
        margin: 10px auto !important;
    }
}

/* Animation enhancement */
.ays-pb-modal.ays-pb-modal-animated {
    animation-duration: 0.3s !important;
}

/* Text styling to match website */
.ays-pb-modal p,
.ays_window p {
    margin: 0 0 10px !important;
    line-height: 1.42857143 !important;
}

/* List styling */
.ays-pb-modal ul,
.ays-pb-modal ol,
.ays_window ul,
.ays_window ol {
    margin-bottom: 10px !important;
}

/* Custom checkbox/radio button styling */
.ays-pb-modal input[type="checkbox"],
.ays-pb-modal input[type="radio"],
.ays_window input[type="checkbox"],
.ays_window input[type="radio"] {
    accent-color: #4A9B9F !important;
}

/* Make sure popup is centered */
.ays-pb-modals:not(.ays-pb-notification-modal) div[class*="ays-pb-modal_"] {
    margin: auto !important;
}

/* Fix plugin's default negative letter-spacing */
.ays-pb-modal *,
.ays_window *,
.ays-pb-modal,
.ays_window,
.ays-pb-modal div,
.ays_window div,
.ays-pb-modal span,
.ays_window span {
    letter-spacing: normal !important;
}

/* Exception: Keep button uppercase letter-spacing */
.ays-pb-modal .btn,
.ays-pb-modal button,
.ays_window .btn,
.ays_window button {
    letter-spacing: 1px !important;
}

/* Additional styling for popup design */
.ays-pb-modal p,
.ays_window p {
    color: #333333 !important;
    font-size: 18px !important;
    line-height: 1.7 !important;
    margin-bottom: 30px !important;
    letter-spacing: normal !important;
}

/* Style phone numbers and important text */
.ays-pb-modal strong,
.ays-pb-modal b,
.ays_window strong,
.ays_window b {
    color: #2C3E50 !important;
    font-weight: 600 !important;
}

/* Image styling within popup */
.ays-pb-modal img,
.ays_window img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 15px auto !important;
}

/* Ensure popup content is well-spaced */
.ays-pb-modal .ays_pb_description,
.ays_window .ays_text {
    padding: 40px 50px !important;
}

/* Button container - center buttons */
.ays-pb-modal .ays_pb_button_container,
.ays_window .button-container {
    text-align: center !important;
    margin-top: 30px !important;
    margin-bottom: 20px !important;
}

/* Close button - circular X in top right corner */
.ays-pb-modal-close,
.ays_pb_close_button,
.ays-pb-close-button {
    position: absolute !important;
    top: 20px !important;
    right: 20px !important;
    background: transparent !important;
    color: #4A9B9F !important;
    border: 2px solid #4A9B9F !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    font-size: 22px !important;
    font-weight: 300 !important;
    line-height: 40px !important;
    text-align: center !important;
    cursor: pointer !important;
    opacity: 1 !important;
    padding: 0 !important;
    transition: all 0.3s ease !important;
}

.ays-pb-modal-close:hover,
.ays_pb_close_button:hover,
.ays-pb-close-button:hover {
    background: #4A9B9F !important;
    color: #ffffff !important;
    border-color: #4A9B9F !important;
    transform: rotate(90deg);
}

