/* 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-title {
    color: var(--text-color);
    font-size: 1.5em;
    margin-bottom: 15px;
    text-align: center;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.dps-sim-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    padding: 15px;
    background-color: var(--input-bg);
    border-radius: 6px;
    font-size: 1.1em;
}

.dps-sim-stats > div {
    color: var(--text-color);
    font-weight: bold;
}

.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);
}
