/**
 * RMSPL Popup Frontend Stylesheet
 * Exact match for the SEBI/Investor Awareness layout & modern modal styling
 */

/* Backdrop overlay */
.rmspl-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(6, 15, 25, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.28s ease, visibility 0.28s ease;
    padding: 16px;
    box-sizing: border-box;
}

.rmspl-modal-backdrop.rmspl-popup-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Modal container */
.rmspl-modal-container {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.4), 0 10px 20px -5px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 980px;
    max-height: 94vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    animation: rmsplModalPopIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #1e293b;
    box-sizing: border-box;
}

@keyframes rmsplModalPopIn {
    0% {
        transform: scale(0.92) translateY(12px);
        opacity: 0;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* -------------------------------------------
   HEADER SECTION
------------------------------------------- */
.rmspl-modal-header {
    background: linear-gradient(135deg, #073860 0%, #0d4a7c 100%);
    padding: 18px 24px;
    color: #ffffff;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    box-sizing: border-box;
}

.rmspl-header-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.rmspl-header-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.rmspl-pill-badge-white {
    background: #ffffff;
    color: #073860;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 4px 12px;
    border-radius: 9999px;
    display: inline-block;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.rmspl-pill-badge-dark {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 9999px;
    display: inline-block;
}

.rmspl-header-top-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Language Switcher */
.rmspl-lang-switcher {
    display: inline-flex;
    background: rgba(0, 0, 0, 0.22);
    border-radius: 9999px;
    padding: 3px;
    gap: 2px;
}

.rmspl-lang-btn {
    border: none;
    background: transparent;
    color: #cfe2f5;
    font-size: 11.5px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.18s ease;
    outline: none;
    line-height: 1.2;
}

.rmspl-lang-btn:hover {
    color: #ffffff;
}

.rmspl-lang-btn.active {
    background: #ffffff;
    color: #073860;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

/* Close Button */
.rmspl-modal-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: #ffffff;
    color: #073860;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    outline: none;
    padding: 0;
    flex-shrink: 0;
}

.rmspl-modal-close:hover {
    background: #e2e8f0;
    transform: scale(1.08);
}

/* Header Main Row */
.rmspl-header-main-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.rmspl-header-icon-box {
    width: 44px;
    height: 44px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #ffffff;
}

.rmspl-shield-svg {
    width: 24px;
    height: 24px;
}

.rmspl-header-titles {
    flex: 1;
}

.rmspl-title-en {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.25;
}

.rmspl-title-hi {
    margin-top: 3px;
    font-size: 13.5px;
    font-weight: 500;
    color: #bfdbfe;
    line-height: 1.35;
}

/* -------------------------------------------
   BODY SECTION
------------------------------------------- */
.rmspl-modal-body {
    padding: 20px 24px;
    background: #f8fafc;
    overflow-y: auto;
    flex: 1;
    box-sizing: border-box;
}

/* Columns Grid */
.rmspl-columns-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

/* Switcher views */
.rmspl-columns-grid.rmspl-view-en .rmspl-col-english {
    display: block;
    grid-column: 1 / -1;
}
.rmspl-columns-grid.rmspl-view-en .rmspl-col-hindi {
    display: none !important;
}

.rmspl-columns-grid.rmspl-view-hi .rmspl-col-hindi {
    display: block;
    grid-column: 1 / -1;
}
.rmspl-columns-grid.rmspl-view-hi .rmspl-col-english {
    display: none !important;
}

.rmspl-columns-grid.rmspl-view-both .rmspl-col-english,
.rmspl-columns-grid.rmspl-view-both .rmspl-col-hindi {
    display: block;
}

/* Column Cards */
.rmspl-col {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.rmspl-col-inner {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
}

.rmspl-col-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.rmspl-col-badge {
    background: #e0f2fe;
    color: #0369a1;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 4px;
}

.rmspl-col-badge.hi-badge {
    background: #fef3c7;
    color: #b45309;
}

.rmspl-col-subbadge {
    font-size: 11.5px;
    font-weight: 700;
    color: #334155;
}

.rmspl-col-title {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
}

.rmspl-col-subtitle {
    margin: 0 0 14px 0;
    font-size: 12px;
    color: #64748b;
    line-height: 1.45;
}

/* Points List */
.rmspl-points-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.rmspl-point-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f0f7ff;
    border: 1px solid #e0effe;
    border-radius: 8px;
    padding: 8px 12px;
    transition: background 0.15s, border-color 0.15s;
}

.rmspl-point-box:hover {
    background: #e8f3ff;
    border-color: #bfdbfe;
}

.rmspl-point-badge {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #073860;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rmspl-point-text {
    font-size: 12.5px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.35;
}

/* Footer note inside column */
.rmspl-col-footer-note {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px dashed #e2e8f0;
    font-size: 11px;
    color: #64748b;
    display: flex;
    align-items: flex-start;
    gap: 5px;
    line-height: 1.4;
}

.rmspl-info-circle {
    font-size: 12px;
    color: #0284c7;
    font-weight: bold;
    flex-shrink: 0;
}

/* -------------------------------------------
   HTML BLOCK POPUP BODY
------------------------------------------- */
.rmspl-modal-html-body {
    background: #ffffff;
    padding: 24px;
}

.rmspl-html-content-area {
    font-size: 14px;
    line-height: 1.65;
    color: #334155;
}

.rmspl-html-content-area p {
    margin: 0 0 12px 0;
}

.rmspl-html-content-area ul,
.rmspl-html-content-area ol {
    margin: 0 0 14px 20px;
    padding: 0;
}

.rmspl-html-content-area li {
    margin-bottom: 6px;
}

.rmspl-html-content-area strong {
    color: #0f172a;
}

/* -------------------------------------------
   FOOTER SECTION
------------------------------------------- */
.rmspl-modal-footer {
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    box-sizing: border-box;
}

.rmspl-footer-left {
    flex: 1;
    min-width: 260px;
}

.rmspl-ack-container {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    font-size: 12.5px;
    color: #475569;
    font-weight: 500;
    line-height: 1.4;
}

.rmspl-ack-checkbox {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.rmspl-custom-checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #94a3b8;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.18s ease;
    color: transparent;
}

.rmspl-ack-checkbox:checked ~ .rmspl-custom-checkmark {
    border-color: #16a34a;
    background: #16a34a;
    color: #ffffff;
}

/* Action button */
.rmspl-btn-acknowledge {
    background: #073860;
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    outline: none;
    box-shadow: 0 2px 4px rgba(7, 56, 96, 0.18);
    line-height: 1.3;
}

.rmspl-btn-acknowledge:hover:not(:disabled) {
    background: #0a497c;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(7, 56, 96, 0.25);
}

.rmspl-btn-acknowledge:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.7;
}

.rmspl-btn-check-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* -------------------------------------------
   RESPONSIVE QUERIES
------------------------------------------- */
@media screen and (max-width: 820px) {
    .rmspl-columns-grid {
        grid-template-columns: 1fr;
    }

    .rmspl-title-en {
        font-size: 17px;
    }

    .rmspl-title-hi {
        font-size: 12.5px;
    }

    .rmspl-modal-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .rmspl-footer-right {
        width: 100%;
    }

    .rmspl-btn-acknowledge {
        width: 100%;
        justify-content: center;
    }
}

