/* =============================================
   Estate Tax Calculator Pro – Stylesheet
   ============================================= */

.etc-wrapper {
    max-width: 920px; margin: 30px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #fff; border: 1px solid #e0e4ea; border-radius: 12px;
    overflow: hidden; box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

/* Header */
.etc-header { background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%); padding: 28px 32px; text-align: center; }
.etc-header-icon { font-size: 36px; margin-bottom: 8px; }
.etc-title { margin: 0 0 6px 0 !important; font-size: 24px !important; font-weight: 700 !important; color: #fff !important; }
.etc-subtitle { margin: 0 !important; font-size: 14px; color: rgba(255,255,255,0.78); }

/* Tabs */
.etc-tabs { display: flex; background: #f9fafb; border-bottom: 2px solid #e5e7eb; }
.etc-tab {
    flex: 1; padding: 14px 10px; font-size: 13px; font-weight: 600; color: #6b7280;
    background: transparent; border: none; border-bottom: 3px solid transparent;
    cursor: pointer; transition: all 0.2s; margin-bottom: -2px;
}
.etc-tab:hover { color: #7c3aed; background: #f5f3ff; }
.etc-tab-active { color: #7c3aed !important; border-bottom-color: #7c3aed !important; background: #fff !important; }

/* Tab content */
.etc-tab-content { display: none; padding: 28px 32px; }
.etc-tab-active { display: block; }

/* Grid */
.etc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }

/* Section labels */
.etc-section-label {
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px;
    color: #7c3aed; margin: 18px 0 10px; padding-bottom: 6px; border-bottom: 2px solid #ede9fe;
}
.etc-section-label:first-child { margin-top: 0; }

/* Fields */
.etc-field { margin-bottom: 12px; }
.etc-label { display: block; font-size: 12px; font-weight: 600; color: #4b5563; margin-bottom: 5px; }
.etc-hint { font-size: 11px; color: #9ca3af; margin-top: 4px; line-height: 1.4; }

.etc-input-wrap { position: relative; }
.etc-prefix { position: absolute; left: 12px; font-size: 14px; font-weight: 600; color: #6b7280; top: 50%; transform: translateY(-50%); pointer-events: none; }
.etc-input {
    width: 100%; padding: 9px 12px 9px 26px; font-size: 14px; font-weight: 500;
    color: #111827; background: #f9fafb; border: 2px solid #e5e7eb; border-radius: 7px;
    outline: none; box-sizing: border-box; transition: border-color 0.2s; -moz-appearance: textfield;
}
.etc-input::-webkit-outer-spin-button, .etc-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.etc-input:focus { border-color: #7c3aed; background: #fff; box-shadow: 0 0 0 3px rgba(124,58,237,0.1); }

.etc-select {
    width: 100%; padding: 9px 36px 9px 12px; font-size: 14px; font-weight: 500;
    color: #111827; background: #f9fafb; border: 2px solid #e5e7eb; border-radius: 7px;
    outline: none; cursor: pointer; appearance: none; box-sizing: border-box;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7280'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center; background-size: 18px;
    transition: border-color 0.2s;
}
.etc-select:focus { border-color: #7c3aed; }

.etc-calc-btn {
    width: 100%; padding: 13px; font-size: 15px; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, #7c3aed, #5b21b6); border: none; border-radius: 8px;
    cursor: pointer; margin-top: 8px; transition: all 0.2s;
}
.etc-calc-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(124,58,237,0.4); }

/* Results */
.etc-results { display: flex; flex-direction: column; gap: 16px; }

.etc-result-hero {
    background: linear-gradient(135deg, #f5f3ff, #ede9fe);
    border: 2px solid #c4b5fd; border-radius: 10px; padding: 20px; text-align: center;
}
.etc-result-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.7px; color: #6b7280; margin-bottom: 8px; }
.etc-result-price { font-size: 40px; font-weight: 800; color: #7c3aed; letter-spacing: -1.5px; line-height: 1; }
.etc-result-sub { font-size: 12px; color: #6b7280; margin-top: 6px; }
.etc-result-notax .etc-result-price { color: #16a34a !important; }

/* Metrics */
.etc-metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.etc-metric { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; padding: 13px 8px; text-align: center; }
.etc-metric-val { font-size: 15px; font-weight: 700; color: #111827; }
.etc-metric-label { font-size: 11px; color: #6b7280; margin-top: 3px; }

/* Breakdown */
.etc-breakdown { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; padding: 16px; }
.etc-breakdown-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: #374151; margin-bottom: 12px; }
.etc-br-row { display: flex; justify-content: space-between; font-size: 12px; color: #4b5563; padding: 5px 0; border-bottom: 1px solid #f3f4f6; }
.etc-br-row:last-child { border-bottom: none; }
.etc-br-sub { color: #6b7280; padding-left: 12px; }
.etc-br-total { font-weight: 700; color: #111827; border-top: 1px solid #d1d5db !important; margin-top: 3px; }
.etc-br-highlight { font-weight: 800; color: #7c3aed; font-size: 13px !important; border-top: 2px solid #7c3aed !important; }

/* Exemption bar */
.etc-exemption-bar { }
.etc-exemption-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: #374151; margin-bottom: 10px; }
.etc-ex-bar-wrap { margin-bottom: 5px; }
.etc-ex-bar { height: 14px; background: #e5e7eb; border-radius: 999px; overflow: hidden; }
.etc-ex-fill { height: 100%; background: linear-gradient(90deg, #7c3aed, #db2777); border-radius: 999px; transition: width 0.6s ease; width: 0%; }
.etc-ex-labels { display: flex; justify-content: space-between; font-size: 11px; color: #9ca3af; }

/* Rate table */
.etc-rate-info { }
.etc-rate-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: #374151; margin-bottom: 8px; }
.etc-rate-table { width: 100%; border-collapse: collapse; font-size: 11px; border: 1px solid #e5e7eb; border-radius: 6px; overflow: hidden; }
.etc-rate-table th { background: #f3f4f6; padding: 6px 10px; text-align: left; font-weight: 600; color: #374151; border-bottom: 1px solid #e5e7eb; }
.etc-rate-table td { padding: 5px 10px; color: #4b5563; border-bottom: 1px solid #f3f4f6; }
.etc-rate-table tr:last-child td { border-bottom: none; }
.etc-rate-table tr.etc-active-row td { background: #f5f3ff; color: #7c3aed; font-weight: 700; }

/* State info card */
.etc-state-info-card { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; padding: 16px; }
.etc-si-title { font-size: 14px; font-weight: 700; color: #111827; margin-bottom: 12px; }
.etc-si-rows { display: flex; flex-direction: column; gap: 6px; }
.etc-si-row { display: flex; justify-content: space-between; font-size: 12px; color: #4b5563; padding: 4px 0; border-bottom: 1px solid #f3f4f6; }
.etc-si-row:last-child { border-bottom: none; }

/* State map note */
.etc-state-map-note, .etc-inherit-note {
    background: #fefce8; border: 1px solid #fde68a; border-radius: 8px;
    padding: 12px 14px; font-size: 12px; color: #78350f; line-height: 1.6;
}

.etc-disclaimer { font-size: 11px; color: #9ca3af; margin: 0 !important; line-height: 1.5; }

@media (max-width: 680px) {
    .etc-grid { grid-template-columns: 1fr; }
    .etc-tab-content { padding: 20px 16px; }
    .etc-tab { font-size: 11px; padding: 11px 5px; }
    .etc-result-price { font-size: 32px; }
    .etc-metrics { grid-template-columns: repeat(3,1fr); }
}
