/* Renewed Medical Health - 15% offer popup.
   Keep this file in the same CHILD THEME directory as functions.php. */
.rmh-offer-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(20, 28, 22, .48);
}
.rmh-offer-overlay.is-open { display: flex; }

.rmh-offer-modal {
    position: relative;
    width: min(750px, 100%);
    max-height: calc(100dvh - 40px);
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .18);
    font-family: inherit;
    box-sizing: border-box;
}
/* The content scrolls independently, so the close button does not move. */
.rmh-offer-scroll {
    max-height: calc(100dvh - 40px);
    overflow-x: hidden;
    overflow-y: auto;
    padding: 16px;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}
button.rmh-offer-close {
    all: unset;
    box-sizing: border-box !important;
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    bottom: auto !important;
    left: auto !important;
    z-index: 100 !important;
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, .96) !important;
    color: #253c2b !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 31px !important;
    font-weight: 300 !important;
    line-height: 1 !important;
    text-align: center !important;
    cursor: pointer !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .13) !important;
    transform: none !important;
    translate: none !important;
    rotate: none !important;
    scale: none !important;
    float: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: background-color .15s ease, box-shadow .15s ease !important;
}
button.rmh-offer-close::before,
button.rmh-offer-close::after {
    display: none !important;
    content: none !important;
}
button.rmh-offer-close:hover,
button.rmh-offer-close:focus,
button.rmh-offer-close:active {
    top: 12px !important;
    right: 12px !important;
    bottom: auto !important;
    left: auto !important;
    width: 48px !important;
    height: 48px !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    color: #253c2b !important;
    transform: none !important;
    translate: none !important;
    rotate: none !important;
    scale: none !important;
    box-shadow: 0 3px 16px rgba(0, 0, 0, .18) !important;
}
button.rmh-offer-close:focus-visible {
    outline: 2px solid #78a77c !important;
    outline-offset: 2px !important;
}

.rmh-offer-head {
    padding: 26px 58px 24px;
    text-align: center;
    background: #f0f2ec;
    border-radius: 14px;
}
.rmh-offer-label {
    display: inline-block;
    margin-bottom: 10px;
    padding: 4px 9px;
    border-radius: 20px;
    background: #dcebd9;
    color: #3e7045;
    font-size: 12px;
    line-height: 1;
}
.rmh-offer-head h2 {
    margin: 0 0 12px;
    color: #253c2b;
    font: inherit;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 500;
    line-height: 1.12;
}
.rmh-offer-head p { margin: 0 0 10px; line-height: 1.5; }
.rmh-offer-head strong { display: block; font-weight: 600; }

.rmh-offer-form {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}
/* Required: author CSS must not override the form's hidden attribute on success. */
.rmh-offer-form[hidden], .rmh-offer-success[hidden] { display: none !important; }
.rmh-offer-form input {
    width: 100%;
    min-height: 50px;
    box-sizing: border-box;
    padding: 0 18px;
    border: 1px solid #d8d8d8;
    border-radius: 28px;
    background: #fff;
    font: inherit;
    outline: 0;
}
.rmh-offer-form input:focus {
    border-color: #78a77c;
    box-shadow: 0 0 0 3px rgba(82, 153, 88, .12);
}
.rmh-offer-form button[type="submit"] {
    width: 100%;
    min-height: 50px;
    border: 0;
    border-radius: 28px;
    background: #4aa653;
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.rmh-offer-form button[type="submit"]:disabled { opacity: .7; cursor: wait; }
.rmh-offer-form button[type="submit"]:hover { filter: brightness(.96); }
.rmh-offer-note {
    padding: 0 10px 2px;
    color: #696969;
    font-size: 12px;
    text-align: center;
}
.rmh-offer-status {
    min-height: 1.2em;
    margin: 0;
    color: #a12e2e;
    font-size: 13px;
    text-align: center;
}
.rmh-offer-success { padding: 35px 25px; text-align: center; }
.rmh-honeypot {
    position: absolute !important;
    left: -99999px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
@media (max-width: 767px) {
    .rmh-offer-overlay { padding: 10px; }
    .rmh-offer-modal {
        width: 100%;
        max-height: calc(100dvh - 20px);
        border-radius: 15px;
    }
    .rmh-offer-scroll {
        max-height: calc(100dvh - 20px);
        padding: 10px;
    }
    button.rmh-offer-close,
    button.rmh-offer-close:hover,
    button.rmh-offer-close:focus,
    button.rmh-offer-close:active {
        top: 8px !important;
        right: 8px !important;
        bottom: auto !important;
        left: auto !important;
        width: 52px !important;
        height: 52px !important;
        min-width: 52px !important;
        min-height: 52px !important;
        font-size: 32px !important;
        transform: none !important;
        translate: none !important;
    }
    .rmh-offer-head { padding: 58px 18px 22px; }
    .rmh-offer-head h2 { padding: 0; font-size: 29px; }
    .rmh-offer-head p { font-size: 14px; }
}
