/**
 * ConvMaster - Earthquake Monitor Styles
 * @package ConvMaster
 * @version 1.0.0
 */

/* ========================================
   TOOL PAGE LAYOUT
   ======================================== */
.tool-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Header */
.tool-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tool-header__icon {
    font-size: 2.5rem;
}

.tool-header__icon .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg, 12px);
    background: var(--bg-tertiary, #1e293b);
}

.tool-header__icon .icon--earthquake {
    background: linear-gradient(135deg, rgba(234, 88, 12, 0.2), rgba(220, 38, 38, 0.2));
}

.tool-header__text h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    color: var(--text-primary, #f1f5f9);
}

.tool-header__text p {
    margin: 0;
    color: var(--text-secondary, #94a3b8);
}

/* ========================================
   CURRENT DATE
   ======================================== */
.earthquake-current-date {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-card, #1e293b);
    border: 1px solid var(--border-color, #334155);
    border-radius: var(--radius-md, 8px);
    padding: 0.875rem 1.25rem;
    margin-bottom: 1.5rem;
}

.earthquake-current-date__icon {
    font-size: 1.25rem;
}

.earthquake-current-date__text {
    font-size: 1rem;
    color: var(--text-primary, #f1f5f9);
    font-weight: 500;
}

/* ========================================
   TABS
   ======================================== */
.earthquake-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.earthquake-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    background: var(--bg-tertiary, #1e293b);
    border: 1px solid var(--border-color, #334155);
    border-radius: var(--radius-md, 8px);
    color: var(--text-secondary, #94a3b8);
    cursor: pointer;
    transition: all 0.2s;
}

.earthquake-tab:hover {
    background: var(--bg-card, #1e293b);
    color: var(--text-primary, #f1f5f9);
    border-color: var(--primary, #f97316);
}

.earthquake-tab--active {
    background: var(--primary, #f97316);
    border-color: var(--primary, #f97316);
    color: white;
}

.earthquake-tab__icon {
    font-size: 1.125rem;
}

.earthquake-tab-content {
    display: none;
}

.earthquake-tab-content--active {
    display: block;
}

/* ========================================
   WIDGET
   ======================================== */
.earthquake-widget {
    background: var(--bg-card, #1e293b);
    border: 1px solid var(--border-color, #334155);
    border-radius: var(--radius-lg, 12px);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.earthquake-widget__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.earthquake-widget__header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary, #f1f5f9);
}

.earthquake-widget__intro {
    color: var(--text-secondary, #94a3b8);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* ========================================
   FILTERS
   ======================================== */
.earthquake-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.earthquake-filters__group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    flex: 1;
    min-width: 150px;
}

.earthquake-filters__group label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary, #94a3b8);
}

.earthquake-select {
    padding: 0.625rem 1rem;
    font-size: 0.9375rem;
    font-family: inherit;
    background: var(--bg-tertiary, #0f172a);
    border: 1px solid var(--border-color, #334155);
    border-radius: var(--radius-md, 8px);
    color: var(--text-primary, #f1f5f9);
    cursor: pointer;
    transition: border-color 0.2s;
}

.earthquake-select:hover,
.earthquake-select:focus {
    border-color: var(--primary, #f97316);
    outline: none;
}

/* ========================================
   MAP
   ======================================== */
.earthquake-map-container {
    position: relative;
    border-radius: var(--radius-md, 8px);
    overflow: hidden;
    margin-bottom: 1rem;
}

.earthquake-map {
    height: 400px;
    width: 100%;
    background: var(--bg-tertiary, #0f172a);
    border-radius: var(--radius-md, 8px);
}

.earthquake-map-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: rgba(15, 23, 42, 0.9);
    color: var(--text-secondary, #94a3b8);
    z-index: 1000;
}

.earthquake-map-loading[hidden] {
    display: none;
}

.earthquake-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color, #334155);
    border-top-color: var(--primary, #f97316);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   LEGEND
   ======================================== */
.earthquake-legend {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary, #0f172a);
    border-radius: var(--radius-md, 8px);
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.earthquake-legend__title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary, #94a3b8);
}

.earthquake-legend__items {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.earthquake-legend__item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--text-secondary, #94a3b8);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-dot--minor { background: #22c55e; }
.legend-dot--light { background: #eab308; }
.legend-dot--moderate { background: #f97316; }
.legend-dot--strong { background: #ef4444; }
.legend-dot--major { background: #dc2626; }
.legend-dot--great { background: #7f1d1d; }

/* ========================================
   STATS
   ======================================== */
.earthquake-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.earthquake-stat {
    text-align: center;
    padding: 1rem;
    background: var(--bg-tertiary, #0f172a);
    border-radius: var(--radius-md, 8px);
}

.earthquake-stat__value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary, #f97316);
    margin-bottom: 0.25rem;
}

.earthquake-stat__label {
    font-size: 0.8125rem;
    color: var(--text-secondary, #94a3b8);
}

/* ========================================
   EARTHQUAKE LIST
   ======================================== */
.earthquake-list {
    max-height: 400px;
    overflow-y: auto;
}

.earthquake-list__empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary, #94a3b8);
}

.earthquake-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color, #334155);
    transition: background 0.2s;
    cursor: pointer;
}

.earthquake-item:last-child {
    border-bottom: none;
}

.earthquake-item:hover {
    background: var(--bg-tertiary, #0f172a);
}

.earthquake-item__mag {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.125rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.earthquake-item__mag--minor { background: #22c55e; }
.earthquake-item__mag--light { background: #eab308; }
.earthquake-item__mag--moderate { background: #f97316; }
.earthquake-item__mag--strong { background: #ef4444; }
.earthquake-item__mag--major { background: #dc2626; }
.earthquake-item__mag--great { background: #7f1d1d; }

.earthquake-item__info {
    flex: 1;
    min-width: 0;
}

.earthquake-item__title {
    font-weight: 600;
    color: var(--text-primary, #f1f5f9);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.earthquake-item__meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8125rem;
    color: var(--text-secondary, #94a3b8);
}

.earthquake-item__time {
    color: var(--primary, #f97316);
}

/* ========================================
   SCALE TABLES
   ======================================== */
.earthquake-scales-grid {
    display: grid;
    gap: 1.5rem;
}

.earthquake-scale-table {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.scale-row {
    display: grid;
    grid-template-columns: 100px 150px 1fr 120px;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary, #0f172a);
    border-radius: var(--radius-sm, 6px);
    align-items: center;
}

.scale-row--header {
    background: transparent;
    font-weight: 600;
    color: var(--text-secondary, #94a3b8);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.earthquake-scale-table--mercalli .scale-row {
    grid-template-columns: 80px 120px 1fr;
}

.scale-col {
    font-size: 0.875rem;
    color: var(--text-primary, #f1f5f9);
}

.scale-col--mag,
.scale-col--intensity {
    font-weight: 700;
    font-size: 1rem;
}

.scale-col--desc,
.scale-col--shaking {
    font-weight: 500;
}

/* Magnitude colors in scale table */
.scale-row[data-level="micro"] .scale-col--mag { color: #22c55e; }
.scale-row[data-level="minor"] .scale-col--mag { color: #84cc16; }
.scale-row[data-level="light"] .scale-col--mag { color: #eab308; }
.scale-row[data-level="moderate"] .scale-col--mag { color: #f97316; }
.scale-row[data-level="strong"] .scale-col--mag { color: #ef4444; }
.scale-row[data-level="major"] .scale-col--mag { color: #dc2626; }
.scale-row[data-level="great"] .scale-col--mag { color: #7f1d1d; }

/* Mercalli intensity colors */
.scale-row[data-mercalli="I"] .scale-col--intensity,
.scale-row[data-mercalli="II"] .scale-col--intensity { color: #22c55e; }
.scale-row[data-mercalli="III"] .scale-col--intensity,
.scale-row[data-mercalli="IV"] .scale-col--intensity { color: #84cc16; }
.scale-row[data-mercalli="V"] .scale-col--intensity,
.scale-row[data-mercalli="VI"] .scale-col--intensity { color: #eab308; }
.scale-row[data-mercalli="VII"] .scale-col--intensity,
.scale-row[data-mercalli="VIII"] .scale-col--intensity { color: #f97316; }
.scale-row[data-mercalli="IX"] .scale-col--intensity,
.scale-row[data-mercalli="X"] .scale-col--intensity { color: #ef4444; }
.scale-row[data-mercalli="XI"] .scale-col--intensity,
.scale-row[data-mercalli="XII"] .scale-col--intensity { color: #7f1d1d; }

/* ========================================
   COMPARISON TABLE
   ======================================== */
.earthquake-comparison-table {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.comparison-row {
    display: grid;
    grid-template-columns: 150px 150px 1fr;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary, #0f172a);
    border-radius: var(--radius-sm, 6px);
    align-items: center;
}

.comparison-row--header {
    background: transparent;
    font-weight: 600;
    color: var(--text-secondary, #94a3b8);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.comparison-col {
    font-size: 0.875rem;
    color: var(--text-primary, #f1f5f9);
}

/* ========================================
   CONVERTER
   ======================================== */
.earthquake-converter {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.earthquake-converter__input {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.earthquake-converter__input label {
    font-weight: 500;
    color: var(--text-secondary, #94a3b8);
}

.input-with-slider {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.earthquake-input {
    padding: 0.75rem 1rem;
    font-size: 1.25rem;
    font-weight: 600;
    font-family: inherit;
    background: var(--bg-tertiary, #0f172a);
    border: 1px solid var(--border-color, #334155);
    border-radius: var(--radius-md, 8px);
    color: var(--text-primary, #f1f5f9);
    text-align: center;
    transition: border-color 0.2s;
    -moz-appearance: textfield;
}

.earthquake-input::-webkit-outer-spin-button,
.earthquake-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.earthquake-input::placeholder {
    color: var(--text-muted, #64748b);
}

.earthquake-input:focus {
    border-color: var(--primary, #f97316);
    outline: none;
}

.earthquake-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, 
        #22c55e 0%, 
        #84cc16 20%, 
        #eab308 35%, 
        #f97316 50%, 
        #ef4444 65%, 
        #dc2626 80%, 
        #7f1d1d 100%
    );
    outline: none;
}

.earthquake-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--primary, #f97316);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.earthquake-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--primary, #f97316);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ========================================
   CONVERTER RESULTS
   ======================================== */
.earthquake-converter__results {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.converter-result {
    background: var(--bg-tertiary, #0f172a);
    border-radius: var(--radius-md, 8px);
    padding: 1.25rem;
    text-align: center;
}

.converter-result__label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary, #94a3b8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.converter-result__value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary, #f97316);
    margin-bottom: 0.25rem;
}

.converter-result__desc {
    font-size: 0.8125rem;
    color: var(--text-secondary, #94a3b8);
}

/* ========================================
   VISUAL COMPARISON
   ======================================== */
.earthquake-converter__visual {
    margin-top: 1rem;
}

.visual-comparison {
    height: 24px;
    background: var(--bg-tertiary, #0f172a);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.visual-bar {
    height: 100%;
    background: linear-gradient(to right, 
        #22c55e 0%, 
        #84cc16 20%, 
        #eab308 35%, 
        #f97316 50%, 
        #ef4444 65%, 
        #dc2626 80%, 
        #7f1d1d 100%
    );
    transition: width 0.3s ease;
    border-radius: 12px;
}

.visual-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary, #94a3b8);
}

/* ========================================
   ENERGY COMPARISON
   ======================================== */
.earthquake-energy-comparison {
    display: grid;
    gap: 0.75rem;
}

.energy-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-tertiary, #0f172a);
    border-radius: var(--radius-md, 8px);
}

.energy-item__icon {
    font-size: 1.5rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card, #1e293b);
    border-radius: var(--radius-md, 8px);
}

.energy-item__info {
    flex: 1;
}

.energy-item__name {
    font-weight: 600;
    color: var(--text-primary, #f1f5f9);
    margin-bottom: 0.25rem;
}

.energy-item__value {
    font-size: 0.875rem;
    color: var(--text-secondary, #94a3b8);
}

.energy-item__bar-container {
    width: 100px;
    height: 8px;
    background: var(--bg-card, #1e293b);
    border-radius: 4px;
    overflow: hidden;
}

.energy-item__bar {
    height: 100%;
    background: var(--primary, #f97316);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    border-radius: var(--radius-md, 8px);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn--sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.btn--outline {
    background: transparent;
    border: 1px solid var(--border-color, #334155);
    color: var(--text-secondary, #94a3b8);
}

.btn--outline:hover {
    border-color: var(--primary, #f97316);
    color: var(--primary, #f97316);
}

/* ========================================
   SEO CONTENT
   ======================================== */
.tool-content {
    margin-top: 3rem;
}

.tool-section {
    margin-bottom: 2.5rem;
}

.tool-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary, #f1f5f9);
    margin-bottom: 1rem;
}

.tool-section > p {
    color: var(--text-secondary, #94a3b8);
    line-height: 1.7;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.feature-card {
    background: var(--bg-card, #1e293b);
    border: 1px solid var(--border-color, #334155);
    border-radius: var(--radius-lg, 12px);
    padding: 1.5rem;
}

.feature-card__icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    display: block;
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary, #f1f5f9);
    margin: 0 0 0.5rem;
}

.feature-card p {
    font-size: 0.875rem;
    color: var(--text-secondary, #94a3b8);
    margin: 0;
    line-height: 1.5;
}

/* Steps Grid */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.step-card {
    background: var(--bg-card, #1e293b);
    border: 1px solid var(--border-color, #334155);
    border-radius: var(--radius-lg, 12px);
    padding: 1.5rem;
    position: relative;
}

.step-card__number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--primary, #f97316);
    color: white;
    font-weight: 700;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.step-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary, #f1f5f9);
    margin: 0 0 0.5rem;
}

.step-card p {
    font-size: 0.875rem;
    color: var(--text-secondary, #94a3b8);
    margin: 0;
    line-height: 1.5;
}

/* FAQ */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-item {
    background: var(--bg-card, #1e293b);
    border: 1px solid var(--border-color, #334155);
    border-radius: var(--radius-md, 8px);
    overflow: hidden;
}

.faq-item summary {
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: var(--text-primary, #f1f5f9);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.25rem;
    color: var(--text-secondary, #94a3b8);
    transition: transform 0.2s;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item p {
    padding: 0 1.25rem 1rem;
    margin: 0;
    color: var(--text-secondary, #94a3b8);
    line-height: 1.6;
}

/* ========================================
   LEAFLET OVERRIDES
   ======================================== */
.leaflet-container {
    background: var(--bg-tertiary, #0f172a);
}

.leaflet-popup-content-wrapper {
    background: #1e293b !important;
    border-radius: var(--radius-md, 8px) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
    color: #f1f5f9 !important;
}

.leaflet-popup-content {
    color: #f1f5f9 !important;
    margin: 12px 16px !important;
}

.leaflet-popup-content a {
    color: #f1f5f9 !important;
}

.leaflet-popup-tip {
    background: #1e293b !important;
}

.leaflet-popup-close-button {
    color: #94a3b8 !important;
}

.leaflet-popup-close-button:hover {
    color: #f1f5f9 !important;
}

.earthquake-popup {
    min-width: 200px;
}

.earthquake-popup__title {
    font-weight: 600;
    font-size: 0.9375rem;
    margin-bottom: 0.5rem;
    color: #f1f5f9 !important;
}

.earthquake-popup__details {
    font-size: 0.8125rem;
    color: #94a3b8 !important;
}

.earthquake-popup__details span {
    display: block;
    margin-bottom: 0.25rem;
    color: #94a3b8 !important;
}

.earthquake-popup__mag {
    color: #f97316 !important;
    font-weight: 700;
}

/* Light theme - popups restent sombres pour meilleure lisibilité */
[data-theme="light"] .leaflet-popup-content-wrapper {
    background: #1e293b !important;
    color: #f1f5f9 !important;
}

[data-theme="light"] .leaflet-popup-content {
    color: #f1f5f9 !important;
}

[data-theme="light"] .leaflet-popup-tip {
    background: #1e293b !important;
}

/* ========================================
   LIGHT THEME
   ======================================== */
[data-theme="light"] .tool-header__icon .icon,
[data-theme="light"] .earthquake-current-date,
[data-theme="light"] .earthquake-widget,
[data-theme="light"] .feature-card,
[data-theme="light"] .step-card,
[data-theme="light"] .faq-item {
    background: #ffffff;
    border-color: #e2e8f0;
}

[data-theme="light"] .tool-header__text h1,
[data-theme="light"] .earthquake-widget__header h2,
[data-theme="light"] .feature-card h3,
[data-theme="light"] .step-card h3,
[data-theme="light"] .faq-item summary,
[data-theme="light"] .earthquake-current-date__text,
[data-theme="light"] .scale-col,
[data-theme="light"] .comparison-col,
[data-theme="light"] .earthquake-item__title,
[data-theme="light"] .energy-item__name {
    color: #1e293b;
}

[data-theme="light"] .tool-header__text p,
[data-theme="light"] .earthquake-widget__intro,
[data-theme="light"] .feature-card p,
[data-theme="light"] .step-card p,
[data-theme="light"] .faq-item p,
[data-theme="light"] .tool-section > p,
[data-theme="light"] .earthquake-filters__group label,
[data-theme="light"] .earthquake-stat__label,
[data-theme="light"] .earthquake-item__meta,
[data-theme="light"] .earthquake-legend__title,
[data-theme="light"] .earthquake-legend__item,
[data-theme="light"] .converter-result__label,
[data-theme="light"] .converter-result__desc,
[data-theme="light"] .visual-labels,
[data-theme="light"] .energy-item__value,
[data-theme="light"] .earthquake-converter__input label {
    color: #64748b;
}

[data-theme="light"] .earthquake-tab {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #64748b;
}

[data-theme="light"] .earthquake-tab:hover {
    background: #ffffff;
    color: #1e293b;
}

[data-theme="light"] .earthquake-tab--active {
    background: var(--primary, #f97316);
    border-color: var(--primary, #f97316);
    color: white;
}

[data-theme="light"] .earthquake-select,
[data-theme="light"] .earthquake-input,
[data-theme="light"] .scale-row,
[data-theme="light"] .comparison-row,
[data-theme="light"] .converter-result,
[data-theme="light"] .energy-item,
[data-theme="light"] .earthquake-stat,
[data-theme="light"] .earthquake-legend {
    background: #f8fafc;
    border-color: #e2e8f0;
}

[data-theme="light"] .earthquake-select,
[data-theme="light"] .earthquake-input {
    color: #1e293b;
}

[data-theme="light"] .earthquake-map-loading {
    background: rgba(248, 250, 252, 0.95);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .tool-page {
        padding: 1rem;
    }
    
    .tool-header {
        flex-direction: column;
        text-align: center;
    }
    
    .earthquake-tabs {
        justify-content: center;
    }
    
    .earthquake-tab {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }
    
    .earthquake-map {
        height: 300px;
    }
    
    .earthquake-stats {
        grid-template-columns: 1fr;
    }
    
    .scale-row {
        grid-template-columns: 80px 1fr;
        gap: 0.5rem;
    }
    
    .scale-col--effects,
    .scale-col--freq {
        grid-column: 1 / -1;
        font-size: 0.8125rem;
    }
    
    .earthquake-scale-table--mercalli .scale-row {
        grid-template-columns: 60px 1fr;
    }
    
    .scale-col--damage {
        grid-column: 1 / -1;
    }
    
    .comparison-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .earthquake-converter__results {
        grid-template-columns: 1fr;
    }
    
    .features-grid,
    .steps-grid {
        grid-template-columns: 1fr;
    }
    
    .earthquake-legend {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .energy-item {
        flex-direction: column;
        text-align: center;
    }
    
    .energy-item__bar-container {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .earthquake-tab__icon {
        display: none;
    }
    
    .earthquake-tab {
        flex: 1;
        justify-content: center;
    }
    
    .tool-header__icon .icon {
        width: 56px;
        height: 56px;
    }
    
    .tool-header__text h1 {
        font-size: 1.5rem;
    }
}

/* Hidden utility */
[hidden] {
    display: none !important;
}
