/* ═══════════════════════════════════════════════════
   LNS Find a Doctor  v2  —  Lee and Nee Softwares
═══════════════════════════════════════════════════ */

/* ── Variables ──────────────────────────────────── */
:root {
    --lns-fd-accent:    #4f46e5;
    --lns-fd-accent-dk: #3730a3;
    --lns-fd-accent-lt: #ede9fe;
    --lns-fd-orange:    #f47432;
    --lns-fd-bg:        #f3f4f8;
    --lns-fd-white:     #ffffff;
    --lns-fd-text:      #1f2937;
    --lns-fd-muted:     #6b7280;
    --lns-fd-border:    #e5e7eb;
    --lns-fd-radius:    50px;
    --lns-fd-card-r:    16px;
    --lns-fd-shadow:    0 6px 36px rgba(0,0,0,.10);
}

/* ════════════════════════════════════════════════
   SEARCH FORM WIDGET
════════════════════════════════════════════════ */
.lns-fd-wrap {
    display: flex;
    align-items: stretch;
    background: var(--lns-fd-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--lns-fd-shadow);
    max-width: 600px;
    margin: 0 auto 30px;
    font-family: 'Segoe UI', Arial, sans-serif;
}

/* Left panel */
.lns-fd-side {
    background: var(--lns-fd-accent);
    width: 140px;
    min-width: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 34px 18px;
    gap: 16px;
    flex-shrink: 0;
}
.lns-fd-side-icon svg { width: 60px; height: 60px; }
.lns-fd-side-title {
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    text-align: center;
    margin: 0;
    line-height: 1.25;
    letter-spacing: -.2px;
}

/* Right panel */
.lns-fd-panel {
    flex: 1;
    background: var(--lns-fd-bg);
    padding: 28px 26px 26px;
    min-width: 0;
}

/* Dropdowns */
.lns-fd-field { position: relative; }
.lns-fd-select-wrap select {
    width: 100%;
    padding: 14px 44px 14px 20px;
    border: none;
    border-radius: var(--lns-fd-radius);
    background: var(--lns-fd-white);
    font-size: 14px;
    color: var(--lns-fd-text);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
    cursor: pointer;
    transition: box-shadow .2s;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.lns-fd-select-wrap select:focus  { box-shadow: 0 0 0 2.5px var(--lns-fd-accent); }
.lns-fd-select-wrap select:disabled {
    background: #f0f1f5;
    color: #adb5bd;
    cursor: not-allowed;
}
.lns-fd-chevron {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #9ca3af;
    font-size: 16px;
    line-height: 1;
}

/* Dropdown loading spinner */
.lns-fd-dd-spin {
    position: absolute;
    right: 42px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px; height: 14px;
    border: 2px solid #e5e7eb;
    border-top-color: var(--lns-fd-accent);
    border-radius: 50%;
    animation: lns-fd-spin .7s linear infinite;
    pointer-events: none;
}

/* Validation message */
.lns-fd-val-msg {
    font-size: 12.5px;
    color: #dc2626;
    margin: 8px 4px 0;
}

/* Submit button */
.lns-fd-btn {
    background: var(--lns-fd-orange);
    color: #fff;
    border: none;
    border-radius: var(--lns-fd-radius);
    padding: 13px 40px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.2px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background .18s, transform .1s;
    box-shadow: 0 2px 10px rgba(244,116,50,.35);
}
.lns-fd-btn:hover   { background: #d95e1c; }
.lns-fd-btn:active  { transform: scale(.97); }
.lns-fd-btn:disabled { opacity: .7; cursor: not-allowed; }

.lns-fd-btn-loader {
    width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: lns-fd-spin .7s linear infinite;
}
@keyframes lns-fd-spin { to { transform: rotate(360deg); } }

/* ════════════════════════════════════════════════
   RESULT PAGE
════════════════════════════════════════════════ */
.lns-fd-result-page {
    max-width: 640px;
    margin: 0 auto;
    font-family: 'Segoe UI', Arial, sans-serif;
    padding: 10px 0 40px;
}

/* Back link */
.lns-fd-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--lns-fd-accent);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 22px;
    transition: color .15s;
}
.lns-fd-back-link:hover { color: var(--lns-fd-accent-dk); }

/* Main result card */
.lns-fd-result-card {
    background: var(--lns-fd-white);
    border-radius: var(--lns-fd-card-r);
    box-shadow: var(--lns-fd-shadow);
    overflow: hidden;
}

/* Card header */
.lns-fd-rc-header {
    background: var(--lns-fd-accent);
    padding: 28px 28px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Large avatar */
.lns-fd-rc-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255,255,255,.2);
    color: #fff;
    font-size: 24px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: 1px;
    border: 3px solid rgba(255,255,255,.4);
}

.lns-fd-rc-head-info { flex: 1; min-width: 0; }
.lns-fd-rc-name {
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 4px;
    line-height: 1.2;
}
.lns-fd-rc-qual {
    color: rgba(255,255,255,.8);
    font-size: 13px;
    margin: 0;
}

/* Card body rows */
.lns-fd-rc-body {
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.lns-fd-rc-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--lns-fd-border);
}
.lns-fd-rc-row:last-child { border-bottom: none; padding-bottom: 0; }

.lns-fd-rc-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--lns-fd-muted);
    text-transform: uppercase;
    letter-spacing: .6px;
    min-width: 110px;
    flex-shrink: 0;
}
.lns-fd-rc-value {
    font-size: 14px;
    color: var(--lns-fd-text);
    font-weight: 500;
}

/* Department badge */
.lns-fd-dept-badge {
    display: inline-block;
    background: var(--lns-fd-accent-lt);
    color: var(--lns-fd-accent);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    letter-spacing: .4px;
}

/* Availability */
.lns-fd-rc-avail {
    color: var(--lns-fd-orange) !important;
    font-weight: 600 !important;
}

/* Card footer buttons */
.lns-fd-rc-footer {
    padding: 20px 28px;
    background: var(--lns-fd-bg);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    border-top: 1px solid var(--lns-fd-border);
}
.lns-fd-appt-btn {
    background: var(--lns-fd-orange);
    color: #fff;
    text-decoration: none;
    padding: 12px 26px;
    border-radius: var(--lns-fd-radius);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .8px;
    transition: background .18s;
    box-shadow: 0 2px 10px rgba(244,116,50,.30);
}
.lns-fd-appt-btn:hover { background: #d95e1c; color: #fff; }
.lns-fd-again-btn {
    color: var(--lns-fd-accent);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    padding: 12px 6px;
    transition: color .15s;
}
.lns-fd-again-btn:hover { color: var(--lns-fd-accent-dk); }

/* Empty / Error states */
.lns-fd-result-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--lns-fd-muted);
    font-size: 15px;
}
.lns-fd-result-empty a { color: var(--lns-fd-accent); }
.lns-fd-error {
    background: #fff0f0;
    border: 1px solid #fca5a5;
    border-radius: 10px;
    padding: 14px 18px;
    color: #b91c1c;
    font-size: 14px;
}

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 580px) {
    .lns-fd-wrap        { flex-direction: column; }
    .lns-fd-side        { width: 100%; flex-direction: row; padding: 16px 20px; gap: 12px; min-width: unset; }
    .lns-fd-side-icon   { display: none; }
    .lns-fd-panel       { padding: 18px 16px; }
    .lns-fd-rc-header   { padding: 20px; }
    .lns-fd-rc-avatar   { width: 56px; height: 56px; font-size: 18px; }
    .lns-fd-rc-name     { font-size: 18px; }
    .lns-fd-rc-body     { padding: 18px 20px; }
    .lns-fd-rc-footer   { padding: 16px 20px; }
    .lns-fd-rc-row      { flex-direction: column; align-items: flex-start; gap: 4px; }
    .lns-fd-rc-label    { min-width: unset; }
}
