/* ================================================================
   License Cost Calculator — Frontend Styles
   ================================================================ */

:root {
    --lc-navy:   #0a2540;
    --lc-blue:   #2563eb;
    --lc-text:   #1e293b;
    --lc-muted:  #6b7280;
    --lc-border: #e2e8f0;
    --lc-bg:     #f8fafc;
    --lc-radius: 8px;
}

.lc-calculator { font-family: inherit; color: var(--lc-text); }
.lc-intro { font-size: 15px; line-height: 1.7; color: var(--lc-text); margin-bottom: 32px; }

/* ── STEP 1: Type buttons ── */
.lc-type-buttons {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin: 28px 0 36px;
    flex-wrap: wrap;
    align-items: flex-end;
}
.lc-type-option { display: flex; flex-direction: column; align-items: center; gap: 12px; cursor: pointer; }
.lc-type-icon {
    width: 90px; height: 90px; border-radius: 50%; overflow: hidden; background: transparent;
    display: flex; align-items: center; justify-content: center;
    transition: transform .15s, box-shadow .15s;
    box-shadow: 0 2px 8px rgba(10,37,64,.12);
}
.lc-type-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lc-type-option:hover .lc-type-icon,
.lc-type-option.active .lc-type-icon { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(10,37,64,.22); }
.lc-type-icon-broker, .lc-type-icon-lender,
.lc-type-icon-servicer, .lc-type-icon-debt_collector { background: transparent; }

.lc-type-btn {
    background: var(--lc-navy); color: #fff; border: none; border-radius: 50px;
    padding: 12px 28px; font-size: 15px; font-weight: 600; cursor: pointer;
    letter-spacing: .02em; transition: background .15s, box-shadow .15s;
    box-shadow: 0 2px 8px rgba(10,37,64,.18); width: 100%; white-space: nowrap;
}
.lc-type-btn:hover,
.lc-type-option.active .lc-type-btn { background: #163554; box-shadow: 0 0 0 3px rgba(37,99,235,.4), 0 4px 16px rgba(10,37,64,.2); }

/* ── STEP 2: Checklist ── */
.lc-loading { color: var(--lc-muted); font-style: italic; padding: 16px 0; }
.lc-checklist-header { background: var(--lc-navy); color: #fff; font-size: 18px; font-weight: 700; text-align: center; padding: 14px 20px; border-radius: var(--lc-radius) var(--lc-radius) 0 0; }
.lc-checklist-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--lc-border); border-top: none; border-radius: 0 0 var(--lc-radius) var(--lc-radius); overflow: hidden; }
.lc-check-item { display: flex; align-items: baseline; gap: 8px; padding: 10px 16px; font-size: 14px; cursor: pointer; border-bottom: 1px solid var(--lc-border); transition: background .1s; }
.lc-check-item:hover { background: #f0f7ff; }
.lc-check-item input[type="checkbox"] { flex-shrink: 0; margin-top: 2px; accent-color: var(--lc-navy); width: 14px; height: 14px; }
.lc-check-item span { color: var(--lc-blue); line-height: 1.4; }
.lc-check-item input:checked + span { color: var(--lc-navy); font-weight: 600; }

/* ── Step actions ── */
.lc-step-actions { display: flex; justify-content: center; margin: 28px 0 16px; }
.lc-run-btn, .lc-start-over-btn {
    background: var(--lc-navy); color: #fff; border: none; border-radius: 50px;
    padding: 14px 48px; font-size: 17px; font-weight: 600; cursor: pointer;
    letter-spacing: .02em; transition: background .15s, transform .1s;
    box-shadow: 0 2px 8px rgba(10,37,64,.18);
}
.lc-run-btn:hover:not(:disabled), .lc-start-over-btn:hover { background: #163554; transform: translateY(-1px); }
.lc-run-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* ── STEP 3: Results table ── */
.lc-results-table { width: 100%; border-collapse: collapse; font-size: 15px; margin-bottom: 8px; }
.lc-results-table thead th { text-align: left; font-weight: 700; font-size: 14px; padding: 12px 16px; border-bottom: 2px solid var(--lc-border); color: var(--lc-text); white-space: nowrap; }
.lc-results-table tbody td { padding: 14px 16px; border-bottom: 1px solid var(--lc-border); vertical-align: middle; }
.lc-results-table tbody tr:nth-child(odd) td { background: #f8fafc; }
.lc-results-table tbody tr:hover td { background: #eef4fb; }
.lc-r-state  { font-weight: 600; white-space: nowrap; }
.lc-r-name   { color: var(--lc-blue); }
.lc-r-fee    { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lc-r-total  { font-weight: 700; }
.lc-r-proc   { color: var(--lc-muted); }
.lc-call-info { font-size: 13px; color: var(--lc-muted); line-height: 1.3; display: inline-block; text-align: right; }
.lc-grand-total-row td { padding: 14px 16px; border-top: 2px solid var(--lc-navy) !important; border-bottom: none !important; background: #fff !important; font-size: 15px; }
.lc-disclaimer { font-size: 13px; color: var(--lc-muted); line-height: 1.6; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--lc-border); }
.lc-r-name-link { color: var(--lc-blue); text-decoration: none; }
.lc-r-name-link:hover { text-decoration: underline; }

/* ── State detail page ── */
.lc-state-detail { margin-top: 16px; }
.lc-state-page-description { font-size: 15px; line-height: 1.75; color: #374151; margin-bottom: 28px; }
.lc-state-page-description a { color: var(--lc-blue); }
.lc-state-page-description p:last-child { margin-bottom: 0; }

/* ── Fee table ── */
.lc-fee-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; background: linear-gradient(to right,#fff 30%,rgba(255,255,255,0)),linear-gradient(to right,rgba(255,255,255,0),#fff 70%) 0 100%,radial-gradient(farthest-side at 0% 50%,rgba(0,0,0,.08),transparent),radial-gradient(farthest-side at 100% 50%,rgba(0,0,0,.08),transparent) 0 100%; background-repeat:no-repeat; background-color:#fff; background-size:40px 100%,40px 100%,14px 100%,14px 100%; background-attachment:local,local,scroll,scroll; }
.lc-state-fee-table { width: 100%; border-collapse: collapse; font-size: 14px; border: 1px solid #d1d5db; border-radius: 6px; overflow: hidden; table-layout: auto; }
.lc-state-fee-table thead th { background: var(--lc-navy); color: #fff; font-weight: 700; font-size: 13px; padding: 11px 14px; text-align: left; white-space: nowrap; border: none; border-right: 1px solid rgba(255,255,255,.1); line-height: 1.3; }
.lc-state-fee-table thead th:last-child { border-right: none; }
.lc-state-fee-table tbody td { padding: 11px 14px; border-bottom: 1px solid #e5e7eb; border-right: 1px solid #f0f0f0; vertical-align: middle; white-space: nowrap; color: #374151; line-height: 1.4; }
.lc-state-fee-table tbody td:last-child { border-right: none; }
.lc-state-fee-table tbody tr:last-child td { border-bottom: none; }
.lc-state-fee-table tbody tr:nth-child(even) td { background: #f9fafb; }
.lc-state-fee-table tbody tr:hover td { background: #eef4fb; }
.lc-th-fee { text-align: left !important; }
.lc-td-fee { text-align: left !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lc-th-total { border-left: 1px solid rgba(255,255,255,.2) !important; font-weight: 700; }
.lc-td-total { border-left: 1px solid #e5e7eb !important; font-weight: 700; color: var(--lc-navy); }
.lc-td-state { color: var(--lc-blue); white-space: nowrap; font-weight: 400; }
.lc-td-name  { color: var(--lc-blue); white-space: nowrap; }
.lc-td-proc  { white-space: nowrap; }
.lc-call-info { font-size: 13px; color: #374151; white-space: nowrap; display: inline; }

/* ── Responsive fee table ── */
@media (max-width: 960px) { .lc-state-fee-table thead th, .lc-state-fee-table tbody td { padding: 9px 10px; font-size: 13px; } }
/* 768px: hide SoS Fee (col 6) */
@media (max-width: 768px) { .lc-state-fee-table thead th, .lc-state-fee-table tbody td { padding: 8px 8px; font-size: 13px; } .lc-state-fee-table th:nth-child(6), .lc-state-fee-table td:nth-child(6) { display: none; } }
/* 600px: also hide RA Fee (col 5) */
@media (max-width: 600px) { .lc-state-fee-table th:nth-child(5), .lc-state-fee-table td:nth-child(5) { display: none; } .lc-state-fee-table thead th, .lc-state-fee-table tbody td { padding: 8px 6px; font-size: 12px; } }
/* 480px: also hide Bond Prem (col 4) */
@media (max-width: 480px) { .lc-state-fee-table th:nth-child(4), .lc-state-fee-table td:nth-child(4) { display: none; } }
/* 400px: also hide MLG Processing (col 7) */
@media (max-width: 400px) { .lc-state-fee-table th:nth-child(7), .lc-state-fee-table td:nth-child(7) { display: none; } .lc-state-fee-table thead th, .lc-state-fee-table tbody td { padding: 7px 5px; font-size: 12px; } }

/* ── License Detail Cards ── */
.lc-detail-cards { display: grid; gap: 28px; margin-top: 36px; }
.lc-detail-grid-1 { grid-template-columns: 1fr; }
.lc-detail-grid-2 { grid-template-columns: repeat(2,1fr); }
.lc-detail-grid-3 { grid-template-columns: repeat(3,1fr); }
@media (max-width: 900px) { .lc-detail-grid-3 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 600px) { .lc-detail-grid-2, .lc-detail-grid-3 { grid-template-columns: 1fr; } }
.lc-detail-card-heading { font-size: 17px; font-weight: 700; color: var(--lc-navy); margin: 0 0 14px; line-height: 1.4; }
.lc-detail-card-body { font-size: 14px; line-height: 1.75; color: #374151; }
.lc-detail-card-body ul {
    list-style: disc;
    margin: 0 0 14px;
    padding-left: 20px;
}
.lc-detail-card-body ol {
    list-style: decimal;
    margin: 0 0 14px;
    padding-left: 20px;
}
.lc-detail-card-body ul li,
.lc-detail-card-body ol li {
    padding: 2px 0;
    display: list-item;
}
/* Ensure theme resets cannot override these */
.lc-detail-card-body ul li::before,
.lc-detail-card-body ol li::before { content: none; }
.lc-detail-card-body strong { color: var(--lc-navy); }
.lc-detail-card-body a { color: var(--lc-blue); }
.lc-detail-card-body p { margin: 0 0 10px; }
.lc-detail-card-body .lc-btn, .lc-state-detail .lc-btn { display: inline-block; background: var(--lc-navy); color: #fff !important; text-decoration: none !important; border-radius: 50px; padding: 12px 28px; font-size: 15px; font-weight: 600; margin-top: 14px; transition: background .15s, transform .1s; box-shadow: 0 2px 8px rgba(10,37,64,.18); cursor: pointer; border: none; }
.lc-detail-card-body .lc-btn:hover, .lc-state-detail .lc-btn:hover { background: #163554; transform: translateY(-1px); }

/* ── General notes ── */
.lc-gen-notes { background: #f0f7ff; border-left: 4px solid var(--lc-blue); border-radius: 0 var(--lc-radius) var(--lc-radius) 0; padding: 16px 20px; margin-top: 24px; }

/* ── Directory grid ── */
.lc-directory .lc-grid { display: grid; gap: 16px; }
.lc-cols-2 .lc-grid { grid-template-columns: repeat(2,1fr); }
.lc-cols-3 .lc-grid { grid-template-columns: repeat(3,1fr); }
.lc-cols-4 .lc-grid { grid-template-columns: repeat(4,1fr); }
.lc-state-card { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--lc-border); border-radius: var(--lc-radius); text-decoration: none; color: inherit; background: #fff; transition: border-color .15s, box-shadow .15s, transform .1s; }
.lc-state-card:hover { border-color: var(--lc-blue); box-shadow: 0 4px 16px rgba(37,99,235,.12); transform: translateY(-2px); }
.lc-state-abbr { flex-shrink: 0; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; background: #e8f0f7; color: var(--lc-navy); font-weight: 700; font-size: 15px; border-radius: 8px; }
.lc-state-name  { font-weight: 600; font-size: 15px; }
.lc-state-count { font-size: 12px; color: var(--lc-muted); margin-top: 2px; }

/* ── Misc ── */
.lc-breadcrumb { font-size: 14px; color: var(--lc-muted); margin-bottom: 16px; }
.lc-breadcrumb a { color: var(--lc-blue); text-decoration: none; }
.lc-breadcrumb a:hover { text-decoration: underline; }
.lc-heading-abbr { display: inline-block; background: var(--lc-navy); color: #fff; font-size: 18px; font-weight: 700; border-radius: 6px; padding: 2px 10px; margin-right: 6px; vertical-align: middle; }
.lc-back-link a { color: var(--lc-blue); text-decoration: none; font-size: 14px; }
.lc-back-link a:hover { text-decoration: underline; }
.lc-no-data { color: var(--lc-muted); font-style: italic; }

/* ── Responsive general ── */
@media (max-width: 768px) { .lc-checklist-grid { grid-template-columns: 1fr; } .lc-cols-3 .lc-grid, .lc-cols-4 .lc-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 480px) { .lc-cols-2 .lc-grid, .lc-cols-3 .lc-grid, .lc-cols-4 .lc-grid { grid-template-columns: 1fr; } .lc-type-btn { padding: 10px 20px; font-size: 14px; } }
