/* SP Compliance Gate — Frontend Styles
 * Extracted from inline_styles() for browser caching.
 */

/* Stage 1 Gate: Scoped styles - CACHE-SAFE IMPLEMENTATION */

/* Default: overlay hidden */
#sp-ruo-stage1-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 999999;
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
    display: none;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

/* ONLY show when html has required class */
html.sp-ruo-stage1-required #sp-ruo-stage1-overlay {
    display: flex;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

/* Scroll lock ONLY when gate required (NO !important to avoid theme conflicts) */
html.sp-ruo-stage1-required {
    overflow: hidden;
}

html.sp-ruo-stage1-required body {
    overflow: hidden;
}

/* Modal box styles (scoped to overlay) */
#sp-ruo-stage1-overlay #sp-ruo-stage1-modal {
    background: white;
    max-width: 500px;
    width: 90%;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    margin: 20px 0;
}

/* All other styles MUST be scoped under #sp-ruo-stage1-overlay or #sp-ruo-stage1-modal */
#sp-ruo-stage1-overlay .sp-ruo-gate-content {
    padding: 24px;
}

#sp-ruo-stage1-overlay .sp-ruo-gate-section {
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 2px solid #E2E8F0;
}

#sp-ruo-stage1-overlay .sp-ruo-gate-section:last-of-type {
    border-bottom: none;
}

#sp-ruo-stage1-overlay .sp-ruo-agreement-box {
    background: #F8FAFC;
    border-left: 4px solid #002868;
    padding: 12px;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    font-size: 13px;
    line-height: 1.5;
}

/* Button base style is inline; hover scoped here */
#sp-ruo-stage1-overlay #sp-ruo-gate-submit:hover {
    background: #BF0A30;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(191, 10, 48, 0.3);
}

/* Legacy Stage 2 and other gate styles below */

#sp-ruo-gate-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#sp-ruo-gate-modal {
    background: white;
    max-width: 700px;
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow-y: auto;
}

.sp-ruo-gate-stripe {
    background: linear-gradient(90deg, #BF0A30 0%, #E8E8E8 50%, #002868 100%);
    height: 4px;
    border-radius: 8px 8px 0 0;
}

.sp-ruo-gate-content {
    padding: 30px;
}

.sp-ruo-gate-section {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 2px solid #E2E8F0;
}

.sp-ruo-gate-section:last-of-type {
    border-bottom: none;
}

.sp-ruo-agreement-box {
    background: #F8FAFC;
    border-left: 4px solid #002868;
    padding: 15px;
    border-radius: 4px;
    max-height: 300px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.6;
}

#sp-ruo-gate-submit:hover {
    background: #BF0A30;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(191, 10, 48, 0.3);
}

.sp-ruo-disclaimer {
    background: #F9FAFB;
    border-left: 3px solid #CBD5E1;
    padding: 15px 20px;
    margin: 20px 0;
    font-size: 13px;
    line-height: 1.6;
    color: #475569;
}

.sp-ruo-disclaimer strong {
    color: #64748B;
    display: inline;
    margin-bottom: 0;
    font-size: 13px;
    font-weight: 500;
}

.sp-ruo-checkout-checkbox {
    margin: 15px 0;
}

.sp-ruo-checkout-checkbox label {
    display: flex !important;
    align-items: flex-start !important;
    gap: 8px !important;
    cursor: pointer !important;
    font-weight: 400 !important;
    color: #475569 !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.sp-ruo-checkout-checkbox label span {
    margin-top: 1px !important;
    line-height: 1.2 !important;
    display: inline !important;
}

.sp-ruo-checkout-checkbox input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    margin: 1px 0 0 0 !important;
}
