/* Shaman DPS Simulation Styles */

.dps-simulation-section {
    margin-top: 30px;
    padding: 20px;
    background-color: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.shaman-dps-container {
    width: 100%;
}

.dps-sim-stats {
    margin-bottom: 20px;
    padding: 14px 16px;
    background-color: var(--input-bg);
    border-radius: 6px;
    font-size: 1.3em;
}

.dps-sim-stats-lines {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.dps-sim-stats-line {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.35em 0.85em;
}

/* Single bar: spell chips | melee chips */
.dps-sim-stats-line--combined {
    gap: 0.45em 1.05em;
}

.dps-sim-stats-sep {
    color: #666;
    font-weight: 700;
    padding: 0 0.5em;
    flex-shrink: 0;
    user-select: none;
}

.dps-sim-stat-chip {
    color: var(--text-color);
    font-weight: bold;
    font-size: inherit;
    white-space: nowrap;
    padding: 0 0.35em;
}

.dps-sim-stat-chip-label {
    color: #aaa;
    font-weight: 600;
}

/* Shared target card: match neutral panel border (not gold accent) */
.dps-shared-target-strip {
    border: 1px solid var(--border-color);
}

/* Align target strip top with Priority System panel (main column content sits ~20px lower) */
.dps-sim-sidebar-column {
    padding-top: 20px;
}

.ability-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ability-row {
    /* Removed flex display as this is now used for table rows */
    transition: all 0.2s ease;
}

.ability-row:hover {
    background-color: rgba(60, 60, 65, 0.5);
}

.ability-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    margin-right: 15px;
    border-radius: 4px;
    overflow: hidden;
    border: 2px solid var(--border-color);
}

.ability-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ability-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ability-name {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--text-color);
}

.ability-damage {
    font-size: 1.1em;
    color: #4CAF50;
    font-weight: 600;
}

.ability-dps {
    font-size: 1em;
    color: #2196F3;
}

.ability-interval {
    font-size: 0.9em;
    color: #888;
}

.ability-formula {
    font-size: 0.8em;
    color: #999;
    margin-top: 4px;
    font-family: monospace;
    line-height: 1.4;
    cursor: help;
    border-top: 1px solid #333;
    padding-top: 4px;
    margin-top: 6px;
}

.ability-modifiers {
    font-size: 0.85em;
    color: #FFA500;
    margin-top: 4px;
    font-style: italic;
}

.modifier-label {
    font-weight: bold;
    color: #FFD700;
}

/* Quality colors for spell schools */
.ability-row[data-school="nature"] .ability-icon {
    border-color: #4CAF50;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.3);
}

.ability-row[data-school="fire"] .ability-icon {
    border-color: #FF5722;
    box-shadow: 0 0 8px rgba(255, 87, 34, 0.3);
}

.ability-row[data-school="frost"] .ability-icon {
    border-color: #2196F3;
    box-shadow: 0 0 8px rgba(33, 150, 243, 0.3);
}

/* Tooltip hover effects */
.ability-icon-hover,
.ability-name-hover {
    cursor: help;
    transition: all 0.2s ease;
}

.ability-icon-hover:hover {
    transform: scale(1.1);
    border-color: #ffd700 !important;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.5) !important;
}

.ability-name-hover:hover {
    color: #ffd700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

/* Hidden tooltip content */
.ability-tooltip {
    display: none;
}

/* Tooltip popup styling (applied via JavaScript) */
.ability-tooltip-popup {
    color: #fff;
}

.ability-tooltip-popup a {
    color: #4CAF50;
    text-decoration: none;
}

.ability-tooltip-popup a:hover {
    text-decoration: underline;
}

/* Sub-ability styling (for Empowered Lightning Shield under Lightning Strike) */
.sub-ability {
    margin-top: 8px;
    padding-left: 20px;
    border-left: 3px solid rgba(255, 215, 0, 0.3);
    opacity: 0.95;
}

.sub-ability .ability-name {
    font-size: 0.95em;
    color: #ffd700;
}

.sub-ability .ability-damage {
    font-size: 0.9em;
    color: #4CAF50;
}

.sub-ability .ability-dps {
    font-size: 0.9em;
    color: #2196F3;
}

.sub-ability .ability-interval {
    font-size: 0.85em;
    color: #888;
    font-style: italic;
}

/* Combined DPS styling */
.combined-dps {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.2);
    font-weight: bold;
    color: #4CAF50;
    font-size: 1.05em;
}

/* Combat Configuration Section */
.combat-config-section {
    margin-bottom: 20px;
    padding: 15px;
    background-color: var(--input-bg);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.combat-config-toggles {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.config-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    color: var(--text-color);
    font-size: 1em;
    padding: 6px 12px;
    background-color: var(--card-bg);
    border-radius: 4px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.config-toggle:hover {
    background-color: var(--input-bg);
    border-color: var(--accent-color);
}

.config-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #4CAF50;
}

.config-toggle span {
    font-weight: 500;
}

/* Combat Sim top row: Boss Importer (left 50%) + Stat Weights (right 50%) */
.combat-sim-top-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.boss-importer-section,
.stat-weights-section {
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

/* Priority System: full width below the top row */
.priority-system-section {
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-top: 20px;
}

.combat-config-in-priority .combat-config-toggles {
    gap: 10px;
}

/* Stat Weights table – min-height to accommodate all stats including tiered armor pen (1, 10, 100);
   no max-height or overflow so the table grows with content beyond that. */
.stat-weights-table-wrap {
    min-height: 520px;
}

.stat-weights-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.stat-weights-table th,
.stat-weights-table td {
    padding: 6px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-weights-table th {
    color: #ffd700;
    font-weight: 600;
}

.stat-weights-table th.stat-weight-sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}

.stat-weights-table th.stat-weight-sortable:hover {
    background-color: rgba(255, 215, 0, 0.1);
}

.stat-weights-table th .sort-indicator {
    margin-left: 4px;
    font-size: 0.8em;
    color: #ffd700;
}

.stat-weights-table td:first-child {
    text-align: left;
}

.stat-weights-table td:nth-child(2),
.stat-weights-table td:nth-child(3),
.stat-weights-table td:nth-child(4) {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.stat-weights-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Results tab — hero metric strip */
.sim-hero-state-json {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Results tab: main column uses full width (sidebar hidden) */
.dps-sim-body-main-row--results-full .dps-sim-tab-panels {
    flex: 1 1 100%;
    max-width: 100%;
    min-width: 0;
}

.sim-results-hero {
    margin: 20px 0 20px 0;
    padding: 18px 16px 20px;
    border-radius: 12px;
    background:
        linear-gradient(145deg, rgba(35, 32, 28, 0.95) 0%, rgba(22, 24, 32, 0.98) 45%, rgba(28, 22, 38, 0.96) 100%);
    border: 1px solid rgba(255, 215, 0, 0.22);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.4),
        0 12px 40px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.sim-results-hero__grid {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) minmax(200px, 1.35fr) minmax(120px, 1fr);
    gap: 12px 16px;
    align-items: center;
}

@media (max-width: 900px) {
    .sim-results-hero__grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .sim-results-hero__col--left,
    .sim-results-hero__col--right {
        align-items: center !important;
        text-align: center !important;
    }
    .sim-results-hero__col--left .sim-hero-mini,
    .sim-results-hero__col--right .sim-hero-mini {
        align-items: center;
    }
    .sim-results-hero__col--center {
        order: -1;
    }
}

.sim-results-hero__col--left,
.sim-results-hero__col--right {
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
}

.sim-results-hero__col--left {
    align-items: flex-end;
    text-align: right;
}

.sim-results-hero__col--right {
    align-items: flex-start;
    text-align: left;
}

.sim-results-hero__col--left .sim-hero-mini {
    align-items: flex-end;
}

.sim-results-hero__col--right .sim-hero-mini {
    align-items: flex-start;
}

.sim-hero-mini {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 11px;
    line-height: 1.2;
}

.sim-hero-mini__lbl {
    color: #7a7a82;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

.sim-hero-mini__val {
    font-size: 14px;
    font-weight: 700;
    color: #e8e8ec;
    font-variant-numeric: tabular-nums;
}

.sim-hero-mini__val--fire {
    color: #ff8a65;
}

.sim-hero-mini__val--nature {
    color: #81c784;
}

.sim-hero-mini__val--frost {
    color: #81d4fa;
}

.sim-results-hero__col--center {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.sim-hero-metric-arrow {
    flex-shrink: 0;
    width: 40px;
    height: 52px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 215, 0, 0.75);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, transform 0.12s;
}

.sim-hero-metric-arrow:hover {
    background: rgba(255, 215, 0, 0.12);
    color: #ffe566;
}

.sim-hero-metric-arrow:active {
    transform: scale(0.96);
}

.sim-results-hero__center-card {
    flex: 1;
    max-width: 320px;
    text-align: center;
    padding: 14px 18px 16px;
    border-radius: 10px;
    background: radial-gradient(ellipse 120% 80% at 50% 0%, rgba(255, 193, 7, 0.14), transparent 55%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(0, 0, 0, 0.25) 100%);
    border: 1px solid rgba(255, 215, 0, 0.28);
    box-shadow: inset 0 0 24px rgba(255, 180, 0, 0.06);
}

.sim-results-hero[data-metric="tps"] .sim-results-hero__center-card {
    background: radial-gradient(ellipse 120% 80% at 50% 0%, rgba(224, 64, 251, 0.12), transparent 55%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(0, 0, 0, 0.28) 100%);
    border-color: rgba(224, 64, 251, 0.35);
    box-shadow: inset 0 0 24px rgba(224, 64, 251, 0.08);
}

.sim-results-hero__metric-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 800;
    letter-spacing: 0.28em;
    text-indent: 0.28em;
    color: rgba(255, 215, 0, 0.92);
    text-transform: uppercase;
    line-height: 1.1;
    margin-bottom: 4px;
    text-shadow: 0 0 24px rgba(255, 200, 80, 0.35);
}

.sim-results-hero[data-metric="tps"] .sim-results-hero__metric-title {
    color: rgba(236, 176, 255, 0.95);
    text-shadow: 0 0 22px rgba(200, 120, 255, 0.35);
}

.sim-results-hero__metric-value {
    font-size: clamp(2.4rem, 7vw, 3.6rem);
    font-weight: 800;
    line-height: 1.05;
    color: #fff;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
}

.sim-results-hero__metric-range {
    margin-top: 6px;
    font-size: clamp(0.95rem, 2.2vw, 1.15rem);
    color: rgba(180, 182, 190, 0.88);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}
