/* ==========================================================================
   Subscription Popup Modal Styles (With Dynamic Viewport Height Scaling)
   ========================================================================== */

/* Backdrop Overlay */
.sub-modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 999999;
    align-items: flex-end; /* Mobile: bottom pinned */
    justify-content: center;
    padding: 0;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    overflow: hidden; /* Prevents overflow while scaling */
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.sub-modal-backdrop.is-active {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Modal Card & All Child Elements Inherit Site Typography */
.sub-modal-card,
.sub-modal-card * {
    font-family: inherit !important;
}

.sub-body-container, 
.sub-header-container {
    padding: 16px 22px;
}

.sub-modal-card {
    position: relative;
    background: #ffffff;
    width: 100%;
    max-width: 100%;
    max-height: 100vh;
    overflow: visible;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.18);
    box-sizing: border-box;
    transform-origin: bottom center; /* Mobile: scales from bottom */
    transition: transform 0.2s ease-out, zoom 0.2s ease-out;
    animation: sheetSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes sheetSlideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Close Button */
.sub-header-container {
    display: flex;
    justify-content: space-between;
}

.sub-modal-close {
    font-size: 26px;
    line-height: 1;
    background: transparent;
    border: none;
    color: #555;
    cursor: pointer;
    padding: 4px;
    z-index: 10;
    transition: color 0.15s ease;
}

.sub-modal-close:hover {
    color: #000;
}

/* Header & Branding */
.sub-modal-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.sub-modal-logo {
    max-height: 45px;
    width: auto;
    display: block;
}

.sub-modal-divider {
    height: 3px;
    background: #FDDD00;
    width: 100%;
    margin: 0 0 12px 0;
    border-radius: 2px;
}

/* Typography */
.sub-step-label {
    font-size: 10px;
	line-height: 1;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 3px;
}

.sub-title {
    font-size: 18px;
    font-weight: 750;
    color: #1a1a1a;
    line-height: 1.35;
    margin: 0 0 4px 0;
}

.sub-subtitle {
    font-size: 11px;
    color: #666;
    margin: 0 0 17px 0;
    line-height: 1.35;
}

/* Plan Preview Box */
.sub-plan-box {
    background: #fff9e6;
    border: 1px solid #ffe082;
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
    box-sizing: border-box;
}

.sub-plan-info {
    display: flex;
    flex-direction: column;
    text-align: left;
	line-height: 2;
}

.sub-plan-label {
    font-size: 10px;
    color: #8d6e63;
    font-weight: 500;
	line-height: 2;
}

.sub-plan-name {
    font-size: 14px;
    font-weight: 700;
    color: #212121;
	line-height: 1.4;
}

.sub-plan-price {
    font-size: 13px;
    font-weight: 800;
    color: #212121;
    white-space: nowrap;
	line-height: 2;
}

/* WPForms Form & Inputs */
#robinage-sub-modal .sub-modal-card input.wpforms-smart-phone-field {
    padding-left: 50px !important;
}

#robinage-sub-modal .sub-modal-card label {
    font-size: 13px !important;
	line-height: 1;
    font-family: inherit !important;
    font-weight: bold !important;
}

#robinage-sub-modal .sub-modal-card label.wpforms-field-label {
    color: #000000 !important;
    margin-bottom: 3px !important;
    display: block !important;
}

#robinage-sub-modal .sub-wpform-container div.wpforms-container-full {
    margin: 14px auto !important;
}

.sub-wpform-container .wpforms-form {
    margin: 0 !important;
}

.sub-wpform-container .wpforms-field-container {
    padding: 0 !important;
}

.sub-wpform-container .wpforms-field {
    margin-bottom: 8px !important;
    padding: 0 !important;
}

.sub-wpform-container input[type="text"],
.sub-wpform-container input[type="email"],
.sub-wpform-container input[type="tel"] {
    font-family: inherit !important;
    width: 100% !important;
    border: 1px solid #dcdcdc !important;
    border-radius: 6px !important;
    padding: 7px 10px !important;
    font-size: 12px !important;
    line-height: normal !important;
    outline: none;
    box-sizing: border-box !important;
    background: #fff !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sub-wpform-container input:focus {
    border-color: #ffb800 !important;
    box-shadow: 0 0 0 2px rgba(255, 184, 0, 0.2) !important;
}

/* Submit Button */
.sub-wpform-container button[type="submit"].wpforms-submit {
    background-color: #fddd00 !important;
    color: #222 !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    line-height: 30px !important;
    border-radius: 6px !important;
    padding: 9px 14px !important;
    border: none !important;
    cursor: pointer !important;
    width: 100% !important;
    transition: background 0.2s ease;
    margin-top: 2px !important;
    text-transform: capitalize !important;
}
body .iti--fullscreen-popup.iti--container {

    z-index: 9999999!important;
	padding:0!important;
}
/* Trust Badge & Footer Note */
.sub-modal-footer-note {
    text-align: center;
}

.sub-modal-footer-note .trust-badge {
    font-size: 11px;
    line-height: 1;
	font-weight: 600;
    color: #666;
    margin: 0 0 3px 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.sub-modal-footer-note .terms-text {
    font-size: 11px;
    color: #888;
    line-height: 1.3;
    margin: 0;
}

.sub-modal-footer-note .terms-text a {
    color: #444;
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Desktop Screen Overrides (min-width: 768px)
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
	
	.sub-step-label {
        font-size: 11px;
        line-height: 1.2;
	}
    .sub-modal-backdrop {
        align-items: center; /* Centered modal */
        padding: 16px;
    }

    .sub-body-container, 
    .sub-header-container {
        padding: 18px 24px;
    }

    .sub-modal-card {
        max-width: 400px;
        max-height: none;
        overflow: visible;
        border-radius: 12px;
        box-shadow: 0 10px 32px rgba(0, 0, 0, 0.2);
        transform-origin: center center; /* Desktop: shrinks cleanly from center */
        animation: modalScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    .sub-modal-divider {
        margin: 0 0 14px 0;
    }

    .sub-title {
        font-size: 23px;
        line-height: 1.35;
        margin-bottom: 5px;
    }

    .sub-subtitle {
        font-size: 15.5px;
        line-height: 1.35;
        margin-bottom: 15px;
    }
	
	.sub-plan-label {
        font-size: 12px;
        line-height: 1.4;
	}
	.sub-plan-name {
		font-size: 15px;
        line-height: 1.4;
	}
	.sub-plan-price {
        font-size: 15px;
        line-height: 1.4;
	}
    .sub-plan-box {
        padding: 8px 12px;
        margin-bottom: 12px;
    }
	#robinage-sub-modal .sub-modal-card label {
        font-size: 15px !important;
        line-height: 1.5;
	}
	.sub-wpform-container input[type="text"],
	.sub-wpform-container input[type="email"],
	.sub-wpform-container input[type="tel"] {

		font-size: 13px !important;
		line-height: normal !important;
	}
	/* Submit Button */
	.sub-wpform-container button[type="submit"].wpforms-submit {  
		font-size: 14px !important;
		line-height: 30px !important;
	}
	.sub-modal-footer-note .trust-badge {
		font-size: 12px;
		line-height: 1;
	}

	.sub-modal-footer-note .terms-text {
		font-size: 12px;
		line-height: 1.3;
	}

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

/* --------------------------------------------------------------------------
   Dynamic Viewport Height Zoom-Out Breakpoints
   (Auto-scales the entire card when height is reduced)
   -------------------------------------------------------------------------- */
@media (max-height: 740px) {
    .sub-modal-card {
        zoom: 1;
        transform: scale(1);
    }
}

@media (max-height: 700px) {
    .sub-modal-card {
        zoom: 0.92;
        transform: scale(0.92);
    }
}

@media (max-height: 660px) {
    .sub-modal-card {
        zoom: 0.86;
        transform: scale(0.86);
    }
}

@media (max-height: 620px) {
    .sub-modal-card {
        zoom: 0.80;
        transform: scale(0.80);
    }
}

@media (max-height: 580px) {
    .sub-modal-card {
        zoom: 0.74;
        transform: scale(0.74);
    }
}

@media (max-height: 540px) {
    .sub-modal-card {
        zoom: 0.68;
        transform: scale(0.68);
    }
}

@media (max-height: 500px) {
    .sub-modal-card {
        zoom: 0.60;
        transform: scale(0.60);
    }
}

@media (max-height: 440px) {
    .sub-modal-card {
        zoom: 0.52;
        transform: scale(0.52);
    }
}