/* ============================================================
   End of Service Calculator — eos-* component styles
   Loaded via tool-page.blade.php @section('styles')
   All layout uses CSS custom properties from design-system tokens.
   ============================================================ */

/* ── HERO ── */
.eos-section { background: var(--bg, #f5f7fb); }

.eos-hero {
    background: linear-gradient(135deg, var(--navy, #152D50) 0%, #1a3a7e 100%);
    padding: clamp(40px, 6vw, 72px) 0 clamp(28px, 4vw, 48px);
    position: relative;
    overflow: hidden;
}
.eos-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 80% at 80% 40%, rgba(240, 183, 63, .12) 0%, transparent 70%);
    pointer-events: none;
}

.eos-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(240, 183, 63, .15);
    border: 1px solid rgba(240, 183, 63, .3);
    border-radius: 50px;
    padding: 6px 16px;
    font-size: 13px;
    color: #f5c869;
    margin-block-end: 18px;
}

.eos-hero h1 {
    font-size: clamp(24px, 4vw, 40px);
    font-weight: 800;
    color: #fff;
    line-height: 1.25;
    margin-block-end: 14px;
}
.eos-hero h1 .eos-h1-accent { color: var(--gold, #f0b73f); }

.eos-hero-desc {
    font-size: 15px;
    color: rgba(255, 255, 255, .75);
    max-width: 540px;
    margin-block-end: 24px;
    line-height: 1.7;
}

/* ── COUNTRY CHIPS ── */
.eos-country-chips {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-block-end: 18px;
}
.eos-country-chip {
    padding: 10px 20px;
    border-radius: 50px;
    border: 2px solid rgba(255, 255, 255, .2);
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color .2s, background .2s, color .2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    line-height: 1;
}
.eos-country-chip:hover { border-color: rgba(255, 255, 255, .5); }
.eos-country-chip.active {
    border-color: var(--gold, #f0b73f);
    background: rgba(240, 183, 63, .15);
    color: var(--gold, #f0b73f);
}
.eos-country-chip[disabled] {
    opacity: .55;
    cursor: not-allowed;
}
.eos-country-chip .eos-chip-coming {
    font-size: 10px;
    font-weight: 400;
    opacity: .7;
    margin-inline-start: 2px;
}

/* ── LAW NOTE ── */
.eos-law-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    font-size: 13px;
    color: rgba(255, 255, 255, .75);
    line-height: 1.6;
    margin-block-start: 4px;
}
.eos-law-note strong { color: #fff; }
.eos-law-note-icon { font-size: 16px; flex-shrink: 0; margin-block-start: 1px; }

/* ── MAIN LAYOUT ── */
.eos-main { padding-block: clamp(24px, 3vw, 40px) clamp(40px, 5vw, 72px); }

.eos-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
    align-items: start;
}

/* ── CARD ── */
.eos-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--border, #e2e8f0);
    box-shadow: 0 2px 8px rgba(10, 31, 68, .06);
    margin-block-end: 20px;
    overflow: hidden;
}
.eos-card:last-child { margin-block-end: 0; }

.eos-card-head {
    padding: 18px 22px 16px;
    border-block-end: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 12px;
}
.eos-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(26, 188, 156, .1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.eos-card-icon--gold { background: rgba(240, 183, 63, .12); }
.eos-card-head h3 {
    font-size: 15px;
    font-weight: 800;
    color: var(--text, #0f172a);
    margin: 0;
}
.eos-card-head p {
    font-size: 12px;
    color: var(--text-muted, #94a3b8);
    margin: 2px 0 0;
}

/* ── FORM FIELDS ── */
.eos-fields {
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.eos-field { display: flex; flex-direction: column; gap: 6px; }
.eos-field label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary, #475569);
}
.eos-field label small {
    font-weight: 400;
    color: var(--text-muted, #94a3b8);
}

.eos-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.eos-input-wrap { position: relative; }
.eos-input {
    width: 100%;
    padding-block: 12px;
    padding-inline-start: 16px;
    padding-inline-end: 56px;
    border-radius: 10px;
    border: 2px solid var(--border, #e2e8f0);
    background: var(--bg, #f5f7fb);
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    color: var(--text, #0f172a);
    outline: none;
    transition: border-color .2s, background .2s;
    text-align: start;
}
.eos-input:focus {
    border-color: var(--teal, #1abc9c);
    background: #fff;
}
.eos-input[type="date"] {
    padding-inline-start: 14px;
    padding-inline-end: 12px;
}
.eos-input-suffix {
    position: absolute;
    inset-inline-end: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted, #94a3b8);
    pointer-events: none;
    background: inherit;
    padding-inline: 4px;
}
.eos-hint {
    font-size: 11px;
    color: var(--text-muted, #94a3b8);
    line-height: 1.5;
}

/* ── REASON CHIPS ── */
.eos-reason-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.eos-reason-chip {
    padding: 12px 14px;
    border-radius: 10px;
    border: 2px solid var(--border, #e2e8f0);
    background: var(--bg, #f5f7fb);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary, #475569);
    cursor: pointer;
    text-align: center;
    transition: border-color .2s, background .2s, color .2s;
    line-height: 1.4;
}
.eos-reason-chip:hover { border-color: var(--teal, #1abc9c); }
.eos-reason-chip.active {
    border-color: var(--teal, #1abc9c);
    background: rgba(26, 188, 156, .08);
    color: #0e8b7a;
}
.eos-reason-chip .eos-chip-sub {
    font-size: 10px;
    font-weight: 400;
    color: var(--text-muted, #94a3b8);
    display: block;
    margin-block-start: 3px;
}
.eos-reason-chip.active .eos-chip-sub { color: #0e8b7a; }

/* ── ENTITLEMENT PREVIEW ── */
.eos-entitlement-preview {
    background: rgba(26, 188, 156, .06);
    border-radius: 10px;
    border: 1.5px solid rgba(26, 188, 156, .2);
    padding: 14px 16px;
    font-size: 13px;
    color: #0e8b7a;
    line-height: 1.6;
}
.eos-entitlement-preview strong { font-size: 14px; }
.eos-entitlement-preview.eos-entitlement--warn {
    background: rgba(220, 38, 38, .05);
    border-color: rgba(220, 38, 38, .2);
    color: #b91c1c;
}

/* ── DATE MODE TOGGLE ── */
.eos-date-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted, #94a3b8);
    cursor: pointer;
    user-select: none;
}
.eos-date-toggle input[type="checkbox"] { accent-color: var(--teal, #1abc9c); }

/* ── RESULT SIDEBAR ── */
.eos-result {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(10, 31, 68, .1);
    border: 1px solid var(--border, #e2e8f0);
    position: sticky;
    top: 80px;
    overflow: hidden;
}
.eos-result-head {
    padding: 20px 22px 16px;
    background: linear-gradient(135deg, var(--navy, #152D50), #1a3a7e);
    color: #fff;
}
.eos-result-head h3 {
    font-size: 15px;
    font-weight: 800;
    margin: 0 0 4px;
    color: #fff;
}
.eos-result-head p {
    font-size: 12px;
    color: rgba(255, 255, 255, .65);
    margin: 0;
}
.eos-result-head .eos-result-country-tag {
    display: inline-block;
    margin-block-start: 8px;
    padding: 3px 10px;
    border-radius: 50px;
    background: rgba(240, 183, 63, .2);
    font-size: 11px;
    color: var(--gold, #f0b73f);
    font-weight: 700;
}

.eos-result-body { padding: 18px 20px; }

.eos-result-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    border-block-end: 1px solid #f1f5f9;
}
.eos-result-row:last-of-type { border-block-end: none; }
.eos-result-label { font-size: 13px; color: var(--text-secondary, #475569); flex: 1; }
.eos-result-val {
    font-size: 14px;
    font-weight: 800;
    color: var(--text, #0f172a);
    text-align: end;
    white-space: nowrap;
}
.eos-result-val--teal { color: #0e8b7a; }
.eos-result-val--gold { color: #a07418; }

/* ── TOTAL BOX ── */
.eos-total-box {
    background: linear-gradient(135deg, #0d3a6e, #1a3a7e);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-block: 16px;
}
.eos-total-label {
    font-size: 12px;
    color: rgba(255, 255, 255, .7);
    margin-block-end: 8px;
}
.eos-total-val {
    font-size: clamp(28px, 6vw, 36px);
    font-weight: 800;
    color: #fff;
    line-height: 1;
    direction: ltr;
}
.eos-total-curr { font-size: 14px; color: rgba(255, 255, 255, .7); margin-block-start: 6px; }
.eos-months-badge {
    display: inline-block;
    margin-block-start: 12px;
    padding: 5px 14px;
    border-radius: 50px;
    background: rgba(240, 183, 63, .2);
    font-size: 12px;
    color: var(--gold, #f0b73f);
    font-weight: 700;
}

/* ── CALCULATE BUTTON ── */
.eos-calc-btn {
    width: 100%;
    padding: 15px;
    border-radius: 10px;
    border: none;
    background: var(--teal, #1abc9c);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: background .2s, transform .15s, box-shadow .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-block-start: 16px;
}
.eos-calc-btn:hover {
    background: #0e8b7a;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(26, 188, 156, .35);
}
.eos-reset-btn {
    width: 100%;
    padding: 11px;
    border-radius: 10px;
    border: 2px solid var(--border, #e2e8f0);
    background: transparent;
    color: var(--text-secondary, #475569);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    margin-block-start: 8px;
    transition: border-color .2s, color .2s;
}
.eos-reset-btn:hover { border-color: var(--text-secondary, #475569); color: var(--text, #0f172a); }

/* ── SHARE BUTTON ── */
.eos-share-btn {
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    border: 1.5px solid rgba(240, 183, 63, .4);
    background: rgba(240, 183, 63, .06);
    color: #a07418;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    margin-block-start: 8px;
    transition: background .2s, border-color .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.eos-share-btn:hover { background: rgba(240, 183, 63, .12); border-color: rgba(240, 183, 63, .6); }

/* ── DISCLAIMER ── */
.eos-disclaimer {
    background: rgba(240, 183, 63, .07);
    border: 1.5px solid rgba(240, 183, 63, .3);
    border-radius: 10px;
    padding: 12px 14px;
    margin-block-start: 14px;
    font-size: 12px;
    color: var(--text-secondary, #475569);
    line-height: 1.6;
}
.eos-disclaimer strong { color: #a07418; }

/* ── BREAKDOWN TABLE ── */
.eos-breakdown {
    background: #fff;
    border-radius: 14px;
    border: 1px solid var(--border, #e2e8f0);
    box-shadow: 0 2px 8px rgba(10, 31, 68, .05);
    margin-block-start: 20px;
    overflow: hidden;
}
.eos-breakdown-head {
    padding: 14px 20px;
    border-block-end: 1px solid #f1f5f9;
    font-size: 14px;
    font-weight: 800;
    color: var(--text, #0f172a);
    display: flex;
    align-items: center;
    gap: 8px;
}
.eos-breakdown-table {
    width: 100%;
    border-collapse: collapse;
}
.eos-breakdown-table th {
    padding: 10px 16px;
    text-align: right;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted, #94a3b8);
    background: var(--bg, #f5f7fb);
    border-block-end: 1px solid var(--border, #e2e8f0);
}
.eos-breakdown-table td {
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text, #0f172a);
    border-block-end: 1px solid #f1f5f9;
}
.eos-breakdown-table tr:last-child td { border-block-end: none; }
.eos-breakdown-table .eos-num { text-align: start; font-weight: 700; direction: ltr; }
.eos-breakdown-table .eos-total-row td {
    font-weight: 800;
    color: #0e8b7a;
    background: rgba(26, 188, 156, .05);
}
.eos-breakdown-table .eos-leave-row td { color: #a07418; background: rgba(240, 183, 63, .04); }

/* ── LAW REFERENCE TABLE ── */
.eos-law-table {
    background: #fff;
    border-radius: 14px;
    border: 1px solid var(--border, #e2e8f0);
    box-shadow: 0 2px 8px rgba(10, 31, 68, .05);
    margin-block-start: 20px;
    overflow: hidden;
}
.eos-law-table-head {
    padding: 14px 20px;
    border-block-end: 1px solid #f1f5f9;
    font-size: 14px;
    font-weight: 800;
    color: var(--text, #0f172a);
    background: var(--bg, #f5f7fb);
    display: flex;
    align-items: center;
    gap: 8px;
}
.eos-law-ref {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.eos-law-ref th {
    padding: 10px 14px;
    text-align: right;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted, #94a3b8);
    background: var(--bg, #f5f7fb);
    border-block-end: 1px solid var(--border, #e2e8f0);
}
.eos-law-ref td {
    padding: 11px 14px;
    border-block-end: 1px solid #f1f5f9;
    color: var(--text-secondary, #475569);
    vertical-align: top;
}
.eos-law-ref tr:last-child td { border-block-end: none; }
.eos-law-ref .eos-law-rate {
    font-weight: 800;
    color: #0e8b7a;
    text-align: start;
    white-space: nowrap;
}
.eos-law-ref .eos-law-rate--danger { color: #b91c1c; }
.eos-law-ref .eos-active-row { background: rgba(26, 188, 156, .04); }
.eos-law-ref .eos-active-row td { font-weight: 700; color: var(--text, #0f172a); }

/* ── KUWAIT PLACEHOLDER ── */
.eos-kw-placeholder {
    padding: 40px 24px;
    text-align: center;
    color: var(--text-muted, #94a3b8);
    font-size: 14px;
    line-height: 1.8;
}
.eos-kw-placeholder .eos-kw-icon { font-size: 40px; margin-block-end: 12px; }
.eos-kw-placeholder strong { color: var(--text-secondary, #475569); display: block; font-size: 15px; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .eos-grid { grid-template-columns: 1fr; }
    .eos-result { position: static; order: -1; }
}
@media (max-width: 640px) {
    .eos-hero { padding-block: 36px 24px; }
    .eos-hero h1 { font-size: 24px; }
    .eos-country-chips { gap: 8px; }
    .eos-country-chip { font-size: 13px; padding: 8px 14px; }
    .eos-fields { padding: 14px 16px; }
    .eos-card-head { padding: 14px 16px 12px; }
    .eos-result-body { padding: 14px 16px; }
    .eos-reason-grid { grid-template-columns: 1fr 1fr; }
    .eos-breakdown-table th,
    .eos-breakdown-table td { padding: 8px 10px; font-size: 12px; }
    .eos-law-ref th,
    .eos-law-ref td { padding: 8px 10px; font-size: 12px; }
}
@media (max-width: 420px) {
    .eos-reason-grid { grid-template-columns: 1fr; }
    .eos-field-row { grid-template-columns: 1fr; }
}

/* ── SHARE MODAL ── */
.eos-share-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.eos-share-modal[hidden] { display: none; }
.eos-share-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.eos-share-modal-card {
    position: relative;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.35);
    max-width: 520px;
    width: 100%;
    overflow: hidden;
    animation: eos-modal-in .25s ease-out;
}
@keyframes eos-modal-in {
    from { opacity: 0; transform: translateY(12px) scale(.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.eos-share-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-block-end: 1px solid var(--border, #e2e8f0);
    background: linear-gradient(135deg, var(--navy, #152D50) 0%, #1a3a7e 100%);
    color: #fff;
}
.eos-share-modal-head h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: #fff;
}
.eos-share-modal-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background .2s;
}
.eos-share-modal-close:hover { background: rgba(255, 255, 255, 0.28); }
.eos-share-modal-body { padding: 20px; }
.eos-share-modal-body p {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--text-muted, #64748b);
    line-height: 1.6;
}
.eos-share-url-box {
    background: var(--bg, #f5f7fb);
    border: 2px solid var(--border, #e2e8f0);
    border-radius: 10px;
    padding: 4px;
    margin-block-end: 16px;
}
#eos-share-url-input {
    width: 100%;
    border: none;
    background: transparent;
    padding: 8px 12px;
    font-family: monospace;
    font-size: 12px;
    color: var(--text, #0f172a);
    outline: none;
    direction: ltr;
}
.eos-share-modal-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.eos-share-modal-copy,
.eos-share-modal-cancel {
    flex: 1;
    padding: 12px 16px;
    border-radius: 10px;
    border: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s, background .2s;
    min-width: 120px;
}
.eos-share-modal-copy {
    background: var(--teal, #1abc9c);
    color: #fff;
}
.eos-share-modal-copy:hover { background: #16a085; transform: translateY(-1px); }
.eos-share-modal-cancel {
    background: var(--bg, #f5f7fb);
    color: var(--text, #0f172a);
    border: 2px solid var(--border, #e2e8f0);
}
.eos-share-modal-cancel:hover { background: #e2e8f0; }

@media (max-width: 480px) {
    .eos-share-modal { padding: 12px; }
    .eos-share-modal-card { border-radius: 14px; }
    .eos-share-modal-actions { flex-direction: column; }
    .eos-share-modal-copy,
    .eos-share-modal-cancel { width: 100%; }
}
