/* ============================================================
   RMB eMitra Forms — Frontend Stylesheet v2.9.4
   Designed to inherit ReachMyBharat theme typography 1:1.
   We DO NOT override .container/.content-wrap/.entry-title/etc —
   those are theme-owned. We ONLY style:
     1. Plugin-specific UI (directory table, section nav, CTA buttons,
        related forms list, back link, dl-count badge)
     2. Content-area details that the theme doesn't cover (custom
        bullet markers, ordered-list pills) — but at the SAME font-size
        and line-height as the theme's .entry-content.

   Typography target (from theme/assets/css/style.css):
     .entry-content       → font-size: 17px;  line-height: 1.8;
     .single-post .entry-title → 2.2rem desktop, 1.6rem mobile
     .entry-content h2   → 1.6rem; border-bottom: 2px solid var(--primary)
     .entry-content h3   → 1.3rem
   ============================================================ */


/* ============================================================
   DIRECTORY PAGE  (shortcode + CPT archive)
   ============================================================ */

.emitrapro-directory {
    font-family: var(--font-hi, 'Noto Sans Devanagari', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif);
    margin: 0 0 40px;
    color: #1a1a1a;
}

/* Hero banner (archive only) */
.emitrapro-dir-hero {
    background: linear-gradient(135deg, #1B3A57, #2563eb);
    color: #fff;
    padding: 24px 22px;
    border-radius: 8px 8px 0 0;
    text-align: center;
    margin: 0;
}
.emitrapro-dir-hero h2 {
    color: #fff !important;
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    border: 0 !important;
    padding: 0 !important;
}
.emitrapro-dir-hero p {
    color: rgba(255,255,255,.9);
    margin: 0 0 12px;
    font-size: 13px;
}
.emitrapro-dir-stats {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}
.emitrapro-dir-stat {
    background: rgba(255,255,255,.18);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}
.emitrapro-dir-stat strong { color: #fff; font-weight: 700; margin-right: 3px; }

/* Toolbar */
.emitrapro-toolbar {
    background: #f8fafc;
    padding: 12px 16px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: var(--radius, 8px) var(--radius, 8px) 0 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.emitrapro-dir-hero + .emitrapro-toolbar { border-radius: 0; border-top: none; }

.emitrapro-search-wrap {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 180px;
    position: relative;
}
.emitrapro-search-icon {
    position: absolute;
    left: 10px;
    font-size: 14px;
    pointer-events: none;
}
.emitrapro-toolbar input[type="search"],
.emitrapro-toolbar input[type="text"] {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
    color: #1a1a1a;
    outline: none;
    font-family: inherit;
}
.emitrapro-toolbar input:focus {
    border-color: var(--primary, #FF6B35);
    box-shadow: 0 0 0 2px rgba(255,107,53,.15);
}
.emitrapro-toolbar select {
    height: 38px;
    padding: 0 10px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
    color: #1a1a1a;
    outline: none;
    font-family: inherit;
    max-width: 100%;
}
.emitrapro-toolbar button,
.emitrapro-toolbar .emitrapro-btn-primary {
    height: 38px;
    padding: 0 18px;
    background: var(--primary, #FF6B35);
    color: #fff !important;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
    text-decoration: none !important;
}
.emitrapro-toolbar button:hover,
.emitrapro-toolbar .emitrapro-btn-primary:hover { background: var(--primary-dark, #E54B17); }
.emitrapro-toolbar .emitrapro-btn-link {
    font-size: 13px;
    color: var(--text-muted, #6b7280);
    text-decoration: none;
    white-space: nowrap;
}
.emitrapro-toolbar .emitrapro-btn-link:hover { color: var(--primary, #FF6B35); }

/* Meta line */
.emitrapro-meta-line,
.emitrapro-count-bar {
    font-size: 12px;
    color: #475569;
    padding: 8px 16px;
    border: 1px solid var(--border, #e5e7eb);
    border-top: none;
    background: #fff;
    margin: 0;
}


/* ============================================================
   DIRECTORY TABLE — strong selectors so theme can't override headers
   ============================================================ */

.emitrapro-table-wrap {
    border: 1px solid var(--border, #e5e7eb);
    border-top: none;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
}
.emitrapro-directory .emitrapro-forms-table,
table.emitrapro-forms-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 0;
    background: #fff;
    margin: 0;
}

/* Head — explicit colors so theme can't make headers invisible */
.emitrapro-directory table.emitrapro-forms-table thead,
table.emitrapro-forms-table thead {
    background: #1B3A57 !important;
}
.emitrapro-directory table.emitrapro-forms-table thead tr,
table.emitrapro-forms-table thead tr {
    background: #1B3A57 !important;
    background-color: #1B3A57 !important;
}
.emitrapro-directory table.emitrapro-forms-table thead th,
table.emitrapro-forms-table thead th {
    padding: 11px 14px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    background: #1B3A57 !important;
    background-color: #1B3A57 !important;
    text-align: left !important;
    text-transform: uppercase;
    letter-spacing: .5px;
    white-space: nowrap;
    border: none !important;
    border-bottom: 2px solid #0f2438 !important;
}

/* Body */
.emitrapro-directory table.emitrapro-forms-table tbody tr,
table.emitrapro-forms-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background .12s;
    background: #fff;
}
.emitrapro-directory table.emitrapro-forms-table tbody tr:nth-child(2n),
table.emitrapro-forms-table tbody tr:nth-child(2n) { background: #fafbfc; }
.emitrapro-directory table.emitrapro-forms-table tbody tr:hover,
table.emitrapro-forms-table tbody tr:hover { background: #fff8f5 !important; }
.emitrapro-directory table.emitrapro-forms-table tbody tr:last-child,
table.emitrapro-forms-table tbody tr:last-child { border-bottom: none; }
.emitrapro-directory table.emitrapro-forms-table td,
table.emitrapro-forms-table td {
    padding: 11px 14px;
    vertical-align: middle;
    color: #1a1a1a;
    font-size: 13px;
}

.col-sn, .td-sn { display: none; }

.col-hi a,
.emitrapro-form-title-hi {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a !important;
    text-decoration: none;
    line-height: 1.4;
    display: block;
}
.col-hi a:hover { color: var(--primary, #FF6B35) !important; }
.emitrapro-form-title-en {
    display: block;
    font-size: 11px;
    color: #6b7280 !important;
    font-weight: 400;
    margin-top: 2px;
}
.col-en {
    font-size: 12px;
    color: #6b7280;
}
.col-act, .td-dl { text-align: center; vertical-align: middle; }

.emitrapro-directory table.emitrapro-forms-table a,
table.emitrapro-forms-table a {
    text-decoration: none !important;
}

/* Category badge (archive only) */
.emitrapro-cat-badge {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    background: #fff3ee;
    color: #FF6B35 !important;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    text-decoration: none !important;
    border: 1px solid #ffd9c7;
}
.emitrapro-cat-badge:hover { background: var(--primary, #FF6B35); color: #fff !important; }

/* Download button in directory table */
.emitrapro-btn-download {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--primary, #FF6B35);
    color: #fff !important;
    border: none;
    border-radius: 6px;
    padding: 7px 13px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background .15s;
    font-family: inherit;
}
.emitrapro-btn-download:hover { background: var(--primary-dark, #E54B17); color: #fff !important; }
.emitrapro-btn-icon { font-size: 13px; }

/* No results */
.emitrapro-no-results {
    padding: 40px 20px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    border: 1px solid var(--border, #e5e7eb);
    border-top: none;
    background: #fff;
}
.emitrapro-no-results a { color: var(--primary, #FF6B35); }

/* Pagination */
.emitrapro-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border: 1px solid var(--border, #e5e7eb);
    border-top: none;
    border-radius: 0 0 var(--radius, 8px) var(--radius, 8px);
    background: #fff;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
}
.emitrapro-pagination a,
.emitrapro-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 6px;
    font-size: 13px;
    color: #1a1a1a;
    text-decoration: none;
    background: #fff;
    transition: all .15s;
}
.emitrapro-pagination .current {
    background: var(--primary, #FF6B35);
    color: #fff !important;
    border-color: var(--primary, #FF6B35);
    font-weight: 700;
}
.emitrapro-pagination a:hover {
    background: var(--primary, #FF6B35);
    color: #fff;
    border-color: var(--primary, #FF6B35);
    text-decoration: none;
}


/* ============================================================
   SINGLE FORM PAGE — small additions, theme owns the rest
   ============================================================ */

/* Inline English subtitle next to Hindi title — kept light & smaller */
.emitrapro-en-title-inline {
    color: var(--text-muted, #6b7280);
    font-size: 0.65em;
    font-weight: 400;
    display: inline-block;
    margin-left: 4px;
    line-height: 1.2;
}

/* Download count chip in entry-meta — looks like other meta items */
.entry-meta .emitrapro-dl-count {
    color: var(--text-muted, #6b7280);
}

/* Section nav pills (right above content) */
.emitrapro-section-nav {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding: 12px 16px;
    border: 1px solid var(--border, #e5e7eb);
    background: #f8fafc;
    margin: 0 0 24px;
    border-radius: var(--radius, 8px);
}
.emitrapro-section-nav a {
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 20px;
    background: #fff;
    color: #6b7280;
    text-decoration: none;
    border: 1px solid var(--border, #e5e7eb);
    white-space: nowrap;
    transition: all .15s;
}
.emitrapro-section-nav a:hover {
    background: #fff3ee;
    color: var(--primary, #FF6B35);
    border-color: #ffc4ae;
    text-decoration: none;
}


/* ============================================================
   ENTRY CONTENT — only enhance bullets/ordered list markers.
   Font-size, line-height, h2/h3 = inherited from theme.
   ============================================================ */

/* Custom bullet markers for unordered lists (orange tick) */
.single-emitra-form .entry-content ul {
    list-style: none;
    padding-left: 0;
    margin: 0 0 1.2em;
}
.single-emitra-form .entry-content ul li {
    position: relative;
    padding-left: 26px;
    margin-bottom: 8px;
    line-height: 1.7;
}
.single-emitra-form .entry-content ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary, #FF6B35);
    font-weight: 700;
    font-size: 14px;
}

/* Numbered orange pill markers for ordered lists */
.single-emitra-form .entry-content ol {
    counter-reset: emitra-counter;
    list-style: none;
    padding-left: 0;
    margin: 0 0 1.2em;
}
.single-emitra-form .entry-content ol li {
    counter-increment: emitra-counter;
    position: relative;
    padding-left: 32px;
    margin-bottom: 12px;
    line-height: 1.7;
}
.single-emitra-form .entry-content ol li::before {
    content: counter(emitra-counter);
    position: absolute;
    left: 0;
    top: 1px;
    width: 22px;
    height: 22px;
    background: var(--primary, #FF6B35);
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Scroll-margin so anchor jumps don't hide under sticky header */
.single-emitra-form .entry-content h2,
.single-emitra-form .entry-content h3 {
    scroll-margin-top: 80px;
}

/* "Note" / disclaimer paragraph styling (small text) */
.single-emitra-form .entry-content p small {
    display: block;
    background: #fafafa;
    border-left: 3px solid #cbd5e1;
    padding: 10px 14px;
    color: #475569;
    font-size: 13px;
    border-radius: 0 4px 4px 0;
    margin-top: 8px;
    line-height: 1.6;
}
.single-emitra-form .entry-content p small strong { color: #1f2937; }


/* ============================================================
   DOWNLOAD CTA BUTTONS (mid + bottom, injected into content)
   ============================================================ */

.emitrapro-cta {
    margin: 26px 0;
    border-radius: var(--radius, 8px);
    overflow: hidden;
}
.emitrapro-cta-top { display: none; }

.emitrapro-cta-mid {
    background: #eff6ff;
    border: 2px dashed #93c5fd;
    padding: 16px;
    border-radius: var(--radius, 8px);
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
}
.emitrapro-cta-bottom {
    background: #f0fdf4;
    border: 2px solid #86efac;
    padding: 16px;
    border-radius: var(--radius, 8px);
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
}

.emitrapro-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--primary, #FF6B35);
    color: #fff !important;
    text-decoration: none !important;
    border: none;
    border-radius: var(--radius, 8px);
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, transform .1s;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    line-height: 1.3;
}
.emitrapro-cta-btn:hover {
    background: var(--primary-dark, #E54B17);
    transform: translateY(-1px);
    text-decoration: none !important;
    color: #fff !important;
}
.emitrapro-cta-bottom .emitrapro-cta-btn { background: #16a34a; }
.emitrapro-cta-bottom .emitrapro-cta-btn:hover { background: #15803d; }

.emitrapro-cta-btn .emitrapro-cta-icon { font-size: 22px; flex-shrink: 0; }
.emitrapro-cta-btn .emitrapro-cta-text { font-size: 13px; color: #fff !important; text-align: left; }
.emitrapro-cta-btn .emitrapro-cta-text strong { display: block; font-size: 15px; color: #fff !important; margin-bottom: 2px; font-weight: 700; }
.emitrapro-cta-btn .emitrapro-cta-text small { font-size: 12px; color: rgba(255,255,255,.85) !important; display: block; }

.emitrapro-cta-unavailable {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius, 8px);
    padding: 16px 20px;
    text-align: center;
    color: #6b7280;
    font-size: 13px;
}
.emitrapro-cta-unavailable strong { color: #b45309; display: block; margin-bottom: 4px; }
.emitrapro-cta-unavailable small { color: #6b7280; font-size: 12px; }


/* ============================================================
   RELATED FORMS LIST
   ============================================================ */

.emitrapro-related { margin: 32px 0 0; }
.emitrapro-related .related-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 14px;
    border-bottom: 3px solid var(--primary, #FF6B35);
    padding-bottom: 6px;
    display: inline-block;
}
.emitrapro-related-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.emitrapro-related-list li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #f7f8fa;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: var(--radius, 8px);
    text-decoration: none;
    transition: all .15s;
}
.emitrapro-related-list li a:hover {
    background: #fff3ee;
    border-color: #ffc4ae;
    transform: translateX(2px);
}
.emitrapro-related-icon { font-size: 18px; }
.emitrapro-related-title { flex: 1; font-size: 14px; color: #1a1a1a; font-weight: 500; }
.emitrapro-related-cta { font-size: 12px; color: var(--primary, #FF6B35); white-space: nowrap; font-weight: 600; }

.emitrapro-back-link { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--border, #e5e7eb); }
.emitrapro-back-link a { font-size: 14px; color: var(--primary, #FF6B35); text-decoration: none; font-weight: 600; }
.emitrapro-back-link a:hover { text-decoration: underline; }


/* ============================================================
   RESPONSIVE — tablet ≥ 480px: row layout for CTA
   ============================================================ */

@media (min-width: 480px) {
    .emitrapro-cta-mid,
    .emitrapro-cta-bottom {
        flex-direction: row;
        align-items: center;
        padding: 16px 20px;
    }
    .emitrapro-cta-btn {
        width: auto;
        flex-shrink: 0;
        min-width: 220px;
    }
    .emitrapro-cta-text { text-align: left; flex: 1; }
}


/* ============================================================
   MOBILE ≤ 480px
   ============================================================ */

@media (max-width: 480px) {
    .emitrapro-section-nav { padding: 10px 12px; gap: 5px; }
    .emitrapro-section-nav a { font-size: 11px; padding: 4px 9px; }
    .emitrapro-toolbar { padding: 10px 12px; gap: 8px; }
    .emitrapro-search-wrap { min-width: 100%; }
    .emitrapro-toolbar select { width: 100%; }

    /* Hero on mobile */
    .emitrapro-dir-hero { padding: 18px 14px; }
    .emitrapro-dir-hero h2 { font-size: 18px; }
    .emitrapro-dir-hero p { font-size: 12px; }
    .emitrapro-dir-stat { padding: 4px 10px; font-size: 11px; }

    /* Inline EN title slightly smaller on mobile */
    .emitrapro-en-title-inline { font-size: 0.6em; display: block; margin: 4px 0 0; }
}


/* ============================================================
   PRINT
   ============================================================ */

@media print {
    .emitrapro-section-nav,
    .emitrapro-share,
    .emitrapro-related,
    .emitrapro-back-link,
    .emitrapro-cta { display: none; }
}


/* ============================================================
   RESPONSIVE TABLE — directory page only
   ============================================================ */

@media (max-width: 520px) {
    .emitrapro-directory table.emitrapro-forms-table th.col-en,
    .emitrapro-directory table.emitrapro-forms-table td.col-en,
    table.emitrapro-forms-table th.col-en,
    table.emitrapro-forms-table td.col-en {
        display: none;
    }

    .col-hi .emitrapro-en-inline {
        display: block;
        font-size: 11px;
        color: #6b7280;
        font-weight: 400;
        margin-top: 2px;
    }

    .emitrapro-directory table.emitrapro-forms-table td,
    table.emitrapro-forms-table td { padding: 10px 10px; }

    .emitrapro-directory table.emitrapro-forms-table thead th,
    table.emitrapro-forms-table thead th {
        padding: 11px 10px !important;
        white-space: normal;
        font-size: 13px !important;
    }

    .col-hi a,
    .emitrapro-form-title-hi {
        font-size: 15px !important;
    }
    .emitrapro-form-title-en {
        font-size: 12px !important;
    }

    .col-act, .td-dl {
        text-align: center !important;
        vertical-align: middle !important;
    }
    .emitrapro-btn-download {
        display: inline-flex !important;
        justify-content: center;
        padding: 9px 12px;
        font-size: 14px;
    }
    .emitrapro-btn-download .emitrapro-btn-label { display: none; }
}

@media (min-width: 521px) and (max-width: 700px) {
    .col-hi .emitrapro-en-inline { display: none; }
    .emitrapro-directory table.emitrapro-forms-table thead th,
    table.emitrapro-forms-table thead th {
        font-size: 10.5px !important;
        padding: 9px 10px !important;
        white-space: normal;
    }
    .emitrapro-directory table.emitrapro-forms-table td,
    table.emitrapro-forms-table td { padding: 9px 10px; }
    .col-en { font-size: 11px; }
}

@media (min-width: 701px) {
    .col-hi .emitrapro-en-inline { display: none; }
}
