/* Maanicare Company Policies Plugin - Frontend Styles v4 */

:root {
    --mcp-dark:     #4a1035;
    --mcp-card-bg:  #c49a55;
    --mcp-white:    #ffffff;
    --mcp-text:     #591B42;
    --mcp-input-bg: #e8d5b8;
    --mcp-radius:   12px;
    --mcp-shadow:   0 4px 24px rgba(74,16,53,0.18);
    --mcp-gold:     #c49a55;
    --mcp-gold-light: #d4af72;
    --mcp-deep:     #2a0a1e;
}
#toolbar{
    display: none!important;
}

.mcp-viewer-footer {
    transition: transform 0.3s ease, opacity 0.3s ease;
}


/* ══════════════════════════════
   CARD
══════════════════════════════ */
.mcp-card {
    background: var(--mcp-card-bg);
    border-radius: var(--mcp-radius);
    padding: 24px 24px 20px;
    box-shadow: var(--mcp-shadow);
    position: relative;
    overflow: visible;
}
.mcp-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.mcp-icon {
    width: 21.33px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mcp-card-header h2 {
    margin: 0;
    font-family: 'sofia-pro-light';
    font-weight: 400;
    font-size: 18px;
    line-height: 140%;
    letter-spacing: -0.02em;
    color:white;
}
.mcp-desc {
    color: white!important;
    font-family: 'sofia-pro-light';
    font-weight: 400;
    font-size: 14px;
    line-height: 140%;
    letter-spacing: -0.02em;
    margin: 0 0 16px;
}
.mcp-desc strong { font-weight: 600; color:white; }

/* ══════════════════════════════
   DROPDOWN
══════════════════════════════ */
.mcp-custom-select-wrap {
    position: relative;
    margin-bottom: 14px;
    user-select: none;
}
.mcp-custom-select-trigger {
    background: transparent!important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 40px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1.2px solid white;
 
    color: white;
    font-size: 16px;
    font-family: 'sofia-pro-light';
    cursor: pointer;
  
    letter-spacing: -0.2px;
}
.mcp-custom-select-wrap.open .mcp-custom-select-trigger {
    border-color: white;
    box-shadow: 0 0 0 2px rgba(74,16,53,0.1);
}
.mcp-select-arrow {
    font-size: 18px;
    color:white;
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin-left: 8px;
}
.mcp-custom-select-wrap.open .mcp-select-arrow { transform: rotate(180deg); }

#mcp-trigger-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: white;
}
#mcp-trigger-text.placeholder { color: white; }

.mcp-custom-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0; right: 0;
    background: var(--mcp-input-bg);
    border: 1.5px solid var(--mcp-dark);
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(74,16,53,0.22);
    z-index: 999999;
    overflow: hidden;
}
.mcp-custom-select-wrap.open .mcp-custom-dropdown { display: block; }

@media (max-width: 600px) {
    .mcp-custom-dropdown {
        position: fixed;
        top: auto;
        bottom: 70px;
        left: 12px; right: 12px;
        border-radius: 14px;
        border: 1.5px solid var(--mcp-dark);
        box-shadow: 0 -4px 32px rgba(74,16,53,0.28);
        z-index: 999999;
        max-height: 55vh;
        display: none;
        flex-direction: column;
        overflow: hidden;
    }
    .mcp-custom-select-wrap.open .mcp-custom-dropdown { display: flex; }
    .mcp-options-list { flex: 1; overflow-y: auto !important; -webkit-overflow-scrolling: touch; max-height: none !important; }
    .mcp-search-inside-wrap { flex-shrink: 0; }
}

.mcp-dropdown-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 999998;
}
.mcp-dropdown-backdrop.mcp-backdrop-active { display: block; }

.mcp-search-inside-wrap {
    padding: 10px 12px 8px;
    border-bottom: 1px solid rgba(74,16,53,0.15);
    background: var(--mcp-input-bg);
}
.mcp-search-inside-input {
    width: 100%;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid rgba(74,16,53,0.2);
    background: var(--mcp-white);
    font-size: 13px;
    font-family: 'sofia-pro-light';
    color: var(--mcp-text);
    outline: none;
}
.mcp-search-inside-input:focus { border-color: var(--mcp-dark); }
.mcp-search-inside-input::placeholder { color: rgba(89,27,66,0.4); }

.mcp-options-list {
    list-style: none;
    margin: 0; padding: 6px 0;
    max-height: 220px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.mcp-options-list::-webkit-scrollbar { width: 4px; }
.mcp-options-list::-webkit-scrollbar-thumb { background: rgba(74,16,53,0.2); border-radius: 4px; }

.mcp-option-item {
    padding: 11px 16px;
    font-size: 13px;
    font-family: 'sofia-pro-light';
    color: var(--mcp-text);
    cursor: pointer;
    transition: background 0.12s;
    min-height: 42px;
    display: flex;
    align-items: center;
    -webkit-tap-highlight-color: transparent;
	text-transform:uppercase!important;
}
.mcp-option-item:hover,
.mcp-option-item:active { background: rgba(74,16,53,0.08); }
.mcp-option-item.selected { background: rgba(74,16,53,0.13); color: var(--mcp-dark); }

.mcp-no-results {
    text-align: center;
    font-size: 12px;
    color: rgba(89,27,66,0.45);
    padding: 14px 16px;
    margin: 0;
}

/* ══════════════════════════════
   BUTTONS
══════════════════════════════ */
.mcp-btn-primary {
    display: block;
    width: 70%!important;
    padding: 12px;
    background:#591B42!important;
    color: white;
    border: 1px solid white;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 400;
    font-family: 'sofia-pro-light';
    line-height: 140%;
    letter-spacing: -0.02em;
    cursor: pointer;
   
    margin-bottom: 8px;
   
}
.mcp-btn-primary:hover:not(:disabled) { background: #6b1f4a; }

.mcp-btn-primary:disabled { opacity: 1; cursor: not-allowed; }

.mcp-btn-ghost {
    display: inline-block;
    background: none;
    border: none;
    color: var(--mcp-dark);
    font-size: 12px;
    font-family: 'sofia-pro-light';
    cursor: pointer;
    padding: 4px 0;
    margin-top: 4px;
    text-decoration: underline;
    opacity: 0.8;
    -webkit-tap-highlight-color: transparent;
}
.mcp-btn-ghost:hover { opacity: 1; }

/* ── Auth fields ── */
.mcp-field-wrap { margin-bottom: 12px; }
.mcp-field-wrap label {
    display: block;
    font-size: 12px;
    font-family: 'sofia-pro-light';
    color: var(--mcp-text);
    margin-bottom: 5px;
}
.mcp-input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1.5px solid rgba(255,255,255,0.65);
    background: var(--mcp-input-bg);
    font-size: 14px;
    font-family: 'sofia-pro-light';
    color: var(--mcp-text);
    outline: none;
    transition: border-color .2s;
}
.mcp-input:focus { border-color: var(--mcp-dark); }
.mcp-input::placeholder { color: #591b42; }
.mcp-otp-input { text-align: center; font-size: 22px; letter-spacing:-0.2px; font-weight: 700; }

.mcp-otp-sent-msg {
    display: none;
    background: rgba(0,128,0,0.1);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 12px;
    font-family: 'sofia-pro-light';
    color: #1a5c1a;
    margin-bottom: 14px;
}
.mcp-message {
    font-size: 14px;
    font-family: 'sofia-pro-light';
    margin-top: 8px;
    min-height: 18px;
    color: white!important;
}
.mcp-message.success { color: white!important; 
	letter-spacing:-0.02em;
	
}

/* ══════════════════════════════════════════
   PDF VIEWER — fullscreen overlay
   Layout: branded top header → PDF fills rest
   Sticky floating Go Back button over PDF
══════════════════════════════════════════ */
.mcp-viewer-wrap {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999999 !important;
    background: #1a0613;
    border-radius: 0 !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ── TOP: Branded header — matches screenshot layout ── */
.mcp-viewer-header {
    flex-shrink: 0;
    background: var(--mcp-dark);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    position: relative;
    z-index: 10;
    overflow: hidden;
}

/* Row 1: Tagline — white bg, centered gold text */
.mcp-viewer-tagline {
    width: 100%;
    background: var(--mcp-white);
    text-align: center;
    padding: 7px 16px;
    font-family: 'sofia-pro-light';
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--mcp-gold);
}

/* Row 2: Brand name — dark maroon bg, left-aligned */
.mcp-viewer-brand-row {
    width: 100%;
    background: var(--mcp-dark);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 10px 20px 12px;
}
.mcp-viewer-logo-text {
    font-family: 'sofia-pro-light';
    font-size: clamp(26px, 5vw, 36px);
    font-weight: 400;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--mcp-white);
    line-height: 1;
}

/* Row 3: Policy strip — gold bg, centered bold text */
.mcp-viewer-policy-strip {
    width: 100%;
    background: #C89C66!important;
    text-align: center;
    padding: 9px 20px;
    font-family: 'sofia-pro-light';
    font-size: 12px;
    font-weight: 700;
    letter-spacing:-0.2px;
    color: #FFFFFF;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── PDF AREA: fills all remaining space, position:relative for absolute footer ── */
.mcp-no-select-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    min-height: 0;
    position: relative;
}
.mcp-pdf-container {
    position: relative;
    width: 100%;
    height: 100%;
    flex: 1;
    min-height: 0;
}

/* PDF iframe fills container */
.mcp-pdf-iframe,
.mcp-pdf-frame {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Cover overlay shown before PDF loads */
.mcp-pdf-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: var(--mcp-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 40px;
    pointer-events: none;
}
.mcp-pdf-cover.hidden {
    display: none;
}
.mcp-cover-brand {
    font-family: 'sofia-pro-light';
    font-size: clamp(14px, 2.5vw, 18px);
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--mcp-white);
    margin-bottom: 6px;
}
.mcp-cover-policy-name {
    font-family: 'sofia-pro-light';
    font-size: clamp(12px, 2vw, 15px);
    font-weight: 400;
    letter-spacing: 0.15em;
    color: var(--mcp-gold);
    text-transform: uppercase;
    text-align: center;
    padding: 0 20px;
    margin-bottom: 16px;
}
.mcp-cover-date {
    font-family: 'sofia-pro-light';
    font-size: 10px;
    letter-spacing: 0.2em;
    color: rgba(196,154,85,0.6);
    text-transform: uppercase;
}

.mcp-pdf-overlay {
    display: none !important;
    pointer-events: none !important;
}

/* ── STICKY "Go Back" button — absolute inside .mcp-no-select-wrap,
   floats over PDF, 40px from bottom ── */
.mcp-viewer-footer {
    position: fixed !important; /* !important lagaya taaki koi aur theme ise override na kare */
    bottom: 30px; /* Isko thoda niche set kiya hai flexbility ke liye */
    left: 20px;   /* Left se fix rahega */
    z-index: 2147483647 !important; /* Maximum possible z-index taaki PDF ke har haal mein upar rahe */
    width: auto; /* Poori width block karne ke bajay auto rakhein */
    background: transparent;
    pointer-events: none;
    
    /* Smooth transition jab hide/show ho */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    transform: translateY(0);
    opacity: 1;
}

/* Jab user niche scroll karega tab yeh class active hogi */
.mcp-viewer-footer.hide-on-scroll {
    transform: translateY(150px) !important; /* Screen se baahar bhej dega */
    opacity: 0 !important;
}

.mcp-go-back-btn {
    pointer-events: all;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #591B42 !important;
    color: white;
    border: 0.8px solid #C89C66;
    border-radius: 8px;
    padding: 9px 17px;
    font-size: 16px;
    font-family: 'sofia-pro-light';
    font-weight: 400;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.6);
}

.mcp-go-back-btn:hover {
    background: #591B42;
    border-color: var(--mcp-gold);
}


/* ══════════════════════════════
   LOADING
══════════════════════════════ */
.mcp-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(74,16,53,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999999;
}
.mcp-spinner {
    width: 40px; height: 40px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: mcp-spin 0.8s linear infinite;
}
@keyframes mcp-spin { to { transform: rotate(360deg); } }

.mcp-hidden { display: none !important; }
@media print { .mcp-widget-wrap { display: none !important; } }
