/* ══════════════════════════════════════════════
   Visa Details Manager — Frontend Card Styles
   v1.1 — Emoji-free, PDF-safe
══════════════════════════════════════════════ */

/* ── Outer wrapper ── */
.vdm-outer {
    max-width: 680px;
    margin: 32px auto;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
}

/* ══════════════════════════════════════════════
   THE VISA CARD
══════════════════════════════════════════════ */
.vdm-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 4px 6px rgba(0,0,0,0.05),
        0 10px 40px rgba(26,35,126,0.12);
    position: relative;
}

/* Top colour stripe */
.vdm-card::before {
    content: '';
    display: block;
    height: 5px;
    background: linear-gradient(90deg, #1a237e 0%, #5c6bc0 50%, #7c4dff 100%);
}

/* ── Card Header ── */
.vdm-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 28px 16px;
    background: #fafbff;
}

.vdm-logo-area {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Passport icon — pure CSS, no emoji */
.vdm-passport-icon {
    display: inline-block;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #1a237e, #5c6bc0);
    border-radius: 8px;
    position: relative;
    flex-shrink: 0;
}
.vdm-passport-icon::after {
    content: '';
    position: absolute;
    inset: 7px;
    border: 2px solid rgba(255,255,255,0.85);
    border-radius: 3px;
}

.vdm-card-title {
    font-size: 18px;
    font-weight: 800;
    color: #1a237e;
    letter-spacing: 2px;
}

.vdm-card-subtitle {
    font-size: 11px;
    color: #9fa8da;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 2px;
}

.vdm-app-id {
    font-size: 11px;
    font-weight: 700;
    color: #9fa8da;
    letter-spacing: 1px;
    background: #e8eaf6;
    padding: 5px 12px;
    border-radius: 20px;
}

/* ── Divider ── */
.vdm-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #c5cae9, transparent);
    margin: 0 28px;
}

/* ── Status Banner ── */
.vdm-status-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 28px;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 15px;
}

/* CSS dot — no emoji */
.vdm-status-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.vdm-s-approved     { background: #e8f5e9; color: #2e7d32; border: 1.5px solid #a5d6a7; }
.vdm-s-approved     .vdm-status-dot { background: #2e7d32; box-shadow: 0 0 0 3px #c8e6c9; }

.vdm-s-pending      { background: #fff8e1; color: #e65100; border: 1.5px solid #ffe082; }
.vdm-s-pending      .vdm-status-dot { background: #e65100; box-shadow: 0 0 0 3px #ffe0b2; }

.vdm-s-rejected     { background: #fce4ec; color: #b71c1c; border: 1.5px solid #f48fb1; }
.vdm-s-rejected     .vdm-status-dot { background: #b71c1c; box-shadow: 0 0 0 3px #ffcdd2; }

.vdm-s-under-review { background: #e3f2fd; color: #0d47a1; border: 1.5px solid #90caf9; }
.vdm-s-under-review .vdm-status-dot { background: #0d47a1; box-shadow: 0 0 0 3px #bbdefb; }

/* ── Section Label ── */
.vdm-section-label {
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #9fa8da;
    text-transform: uppercase;
    padding: 0 28px;
    margin-bottom: 12px;
}

/* ── Info Grid ── */
.vdm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 0 20px;
}

.vdm-field-item {
    padding: 10px 8px;
    border-bottom: 1px solid #f0f1fa;
}

.vdm-field-item:nth-child(odd)  { border-right: 1px solid #f0f1fa; }
.vdm-field-item:last-child,
.vdm-field-item:nth-last-child(2):nth-child(odd) { border-bottom: none; }

.vdm-field-label {
    font-size: 10px;
    font-weight: 700;
    color: #9fa8da;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 3px;
}

.vdm-field-value {
    font-size: 14.5px;
    font-weight: 600;
    color: #1a237e;
}

/* ── Dates Row ── */
.vdm-dates-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 28px 16px;
}

.vdm-date-box {
    flex: 1;
    background: #f5f6ff;
    border-radius: 10px;
    padding: 14px 18px;
    text-align: center;
}

.vdm-date-box.issue  { border-top: 3px solid #5c6bc0; }
.vdm-date-box.expiry { border-top: 3px solid #7c4dff; }

.vdm-date-label {
    font-size: 10.5px;
    color: #9fa8da;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.vdm-date-value {
    font-size: 15px;
    font-weight: 800;
    color: #1a237e;
}

.vdm-date-arrow {
    font-size: 22px;
    color: #c5cae9;
    font-weight: 300;
    flex-shrink: 0;
}

/* ── Sponsor ── */
.vdm-sponsor-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 28px 20px;
    padding: 10px 16px;
    background: #f5f6ff;
    border-radius: 8px;
}

.vdm-sponsor-name {
    font-size: 14px;
    font-weight: 700;
    color: #1a237e;
}

/* ── Card Footer ── */
.vdm-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 28px;
    background: #f5f6ff;
    border-top: 1px solid #e8eaf6;
    font-size: 11px;
    color: #9fa8da;
    font-weight: 600;
}

.vdm-verified {
    color: #5c6bc0;
    font-weight: 800;
    letter-spacing: 1px;
}

/* ══════════════════════════════════════════════
   ACTION BUTTONS
══════════════════════════════════════════════ */
.vdm-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    justify-content: center;
}

.vdm-btn-download,
.vdm-btn-print {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
    letter-spacing: 0.3px;
}

.vdm-btn-download {
    background: linear-gradient(135deg, #1a237e, #3949ab);
    color: #fff;
    box-shadow: 0 4px 14px rgba(26,35,126,0.28);
}

.vdm-btn-print {
    background: #fff;
    color: #1a237e;
    border: 2px solid #c5cae9;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.vdm-btn-download:hover,
.vdm-btn-print:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26,35,126,0.2);
}

.vdm-btn-download.loading {
    opacity: 0.7;
    cursor: wait;
}

/* ══════════════════════════════════════════════
   SEARCH PAGE — [visa_search]
══════════════════════════════════════════════ */
.vdm-search-wrap {
    max-width: 680px;
    margin: 32px auto;
}

.vdm-search-form {
    margin-bottom: 28px;
}

.vdm-search-box {
    background: #fff;
    border-radius: 14px;
    padding: 28px 32px;
    box-shadow: 0 4px 20px rgba(26,35,126,0.10);
}

.vdm-search-box label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #5c6bc0;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.vdm-search-row {
    display: flex;
    gap: 10px;
}

.vdm-search-row input {
    flex: 1;
    padding: 13px 18px;
    border: 2px solid #c5cae9;
    border-radius: 10px;
    font-size: 15px;
    color: #1a237e;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fafbff;
}

.vdm-search-row input:focus {
    border-color: #3949ab;
    box-shadow: 0 0 0 3px rgba(57,73,171,0.12);
}

.vdm-search-row button {
    padding: 13px 28px;
    background: linear-gradient(135deg, #1a237e, #3949ab);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.vdm-search-row button:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

.vdm-not-found {
    background: #fce4ec;
    border: 1.5px solid #f48fb1;
    color: #b71c1c;
    padding: 16px 22px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
}

/* ══════════════════════════════════════════════
   PRINT STYLES
══════════════════════════════════════════════ */
@media print {
    body * { visibility: hidden; }

    .vdm-card,
    .vdm-card * { visibility: visible; }

    .vdm-card {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        box-shadow: none !important;
        border-radius: 0;
    }

    .vdm-buttons,
    .vdm-search-form,
    .vdm-btn-download,
    .vdm-btn-print { display: none !important; }

    .vdm-card::before { display: none; }
}

/* ═══════════════════════════════════════════
   v1.1 — Candidate Identity (Photo)
═══════════════════════════════════════════ */
.vdm-identity{
    display:flex;
    align-items:center;
    gap:18px;
    padding:18px;
    margin:14px 0 18px;
    background:linear-gradient(135deg,#f8fafc 0%,#eef2ff 100%);
    border:1px solid rgba(15,23,42,.06);
    border-radius:14px;
}
.vdm-photo-wrap{flex:0 0 auto;}
.vdm-candidate-photo,
.vdm-photo-placeholder{
    width:96px;height:96px;
    border-radius:50%;
    object-fit:cover;
    border:3px solid #fff;
    box-shadow:0 6px 18px -6px rgba(15,23,42,.25);
    background:#e2e8f0;
    display:flex;align-items:center;justify-content:center;
    font-size:36px;font-weight:700;color:#475569;
    text-transform:uppercase;
}
.vdm-identity-info{min-width:0;flex:1;}
.vdm-candidate-name{
    font-size:20px;font-weight:700;color:#0f172a;
    line-height:1.2;margin-bottom:4px;word-break:break-word;
}
.vdm-candidate-sub{font-size:14px;color:#475569;}

.vdm-field-full{grid-column:1 / -1;}
.vdm-field-value{word-break:break-word;white-space:pre-wrap;}

/* ═══════════════════════════════════════════
   Responsive polish
═══════════════════════════════════════════ */
@media (max-width:600px){
    .vdm-identity{
        flex-direction:column;
        align-items:center;
        text-align:center;
        padding:16px;
        gap:12px;
    }
    .vdm-candidate-photo,
    .vdm-photo-placeholder{width:84px;height:84px;font-size:30px;}
    .vdm-candidate-name{font-size:18px;}
    .vdm-grid{grid-template-columns:1fr !important;}
    .vdm-dates-row{flex-direction:column;gap:10px;}
    .vdm-date-arrow{transform:rotate(90deg);}
    .vdm-buttons{flex-direction:column;}
    .vdm-buttons button{width:100%;}
}
