/* sections/character-styles.css - Character section styles */

/* ===== CHARACTER HEADER ===== */
.character-header {
    text-align: center;
    padding: 20px 0 30px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 30px;
}

.character-header h1 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
}

.character-header .subtitle {
    margin: 0;
    color: #64748b;
    font-size: 15px;
}

/* ===== TAB NAVIGATION ===== */
.character-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e5e7eb;
    padding: 0 20px;
    flex-wrap: wrap;
}

.character-nav .nav-tab {
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #64748b;
    transition: all 0.2s;
    white-space: nowrap;
}

.character-nav .nav-tab:hover {
    color: #0f172a;
    background: #f8fafc;
}

.character-nav .nav-tab.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

/* ===== TAB CONTENT ===== */
.character-content {
    padding: 0 20px;
}

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

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

/* ===== OVERVIEW TAB ===== */
.overview-header {
    text-align: center;
    margin-bottom: 30px;
}

.overview-header h2 {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 600;
    color: #0f172a;
}

.overview-header .subtitle {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stat-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.stat-icon {
    font-size: 24px;
    line-height: 1;
}

.stat-label {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
    line-height: 1.2;
}

.stat-change {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 12px;
}

.stat-change.positive {
    color: #10b981;
}

.stat-change.negative {
    color: #ef4444;
}

.stat-change.neutral {
    color: #64748b;
}

.stat-sparkline {
    margin-top: 12px;
    color: #3b82f6;
    opacity: 0.8;
    height: 40px;
}

.stat-sparkline svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* ===== OVERVIEW INFO SECTION ===== */
.overview-info {
    margin-top: 40px;
}

.info-card {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.info-icon {
    font-size: 32px;
    flex-shrink: 0;
    line-height: 1;
}

.info-content h3 {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
}

.info-content p {
    margin: 0;
    color: #64748b;
    line-height: 1.6;
    font-size: 14px;
}

/* ===== GEAR TAB - PAPERDOLL LAYOUT ===== */
.gear-header {
    text-align: center;
    margin-bottom: 30px;
}

.gear-header h2 {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 600;
    color: #0f172a;
}

.gear-header .subtitle {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

/* Paperdoll Container - WoW-style 3-column layout */
.paperdoll-container {
    display: grid;
    grid-template-columns: 200px 1fr 200px;
    grid-template-rows: 1fr auto;
    gap: 20px;
    max-width: 900px;
    min-height: 506px;
    margin: 0 auto 20px;
    padding: 20px;
    padding-bottom: 0;
    background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
    border-radius: 12px;
    border: 2px solid #64748b;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

/* Full-bleed WPS background image layer */
.paperdoll-wp-img {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 0;
    overflow: hidden;
}

.paperdoll-wp-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.paperdoll-container.has-wp-image .paperdoll-wp-img {
    opacity: 1;
}

.paperdoll-left,
.paperdoll-right {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.paperdoll-center {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 446px;
    position: relative;
    z-index: 1;
}

.character-model {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* model-placeholder no longer used */
.model-placeholder {
    display: none;
}

.model-wp-img {
    display: none;
}

/* Avg iLvl badge — full-width bottom strip spanning all 3 columns */
.avg-ilvl-display {
    grid-column: 1 / -1;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 8px 20px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: white;
    margin: 0 -20px;
}

.avg-ilvl-label {
    font-size: 11px;
    font-weight: 600;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    white-space: nowrap;
}

.avg-ilvl-value {
    font-size: 24px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    line-height: 1;
}

/* Individual gear slots */
.paperdoll-slot {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.75);
    border: 3px solid #94a3b8;
    border-radius: 6px;
    min-height: 50px;
    transition: all 0.2s;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.paperdoll-slot:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    border-color: #3b82f6;
    background: rgba(0, 0, 0, 0.85);
}

.paperdoll-slot.empty {
    background: rgba(0, 0, 0, 0.4);
    border-color: #64748b;
    opacity: 0.6;
}

.paperdoll-slot.empty .slot-icon {
    color: #94a3b8;
    background: none;
}

.paperdoll-slot.empty .slot-label {
    color: #cbd5e1;
    font-style: italic;
}

.paperdoll-slot.filled {
    cursor: pointer;
    background: rgba(0, 0, 0, 0.75);
}

.paperdoll-slot.outlier {
    border-color: #fbbf24;
    background: rgba(0, 0, 0, 0.8);
    box-shadow: 0 0 0 2px #f59e0b, 0 2px 4px rgba(0, 0, 0, 0.3);
}

.paperdoll-slot.outlier::after {
    content: '⚠️';
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 16px;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
}

.slot-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    border: 2px solid #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.slot-overlay {
    flex: 1;
    min-width: 0;
}

.slot-name {
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.slot-ilvl {
    font-size: 11px;
    color: #d1d5db;
    font-weight: 500;
}

.slot-label {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
}

/* Bottom weapon slots */
.paperdoll-bottom {
    display: flex;
    gap: 12px;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.paperdoll-bottom .paperdoll-slot {
    flex: 1;
}

/* Outlier section */
.gear-outliers {
    max-width: 900px;
    margin: 30px auto 0;
    padding: 20px;
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.2) 0%, rgba(251, 191, 36, 0.15) 100%);
    border: 3px solid #f59e0b;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

/* WPS image tinted overlay for outlier section */
.gear-outliers::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--wps-bg, none);
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.gear-outliers.has-wp-image::before {
    opacity: 0.12;
}

.gear-outliers>* {
    position: relative;
    z-index: 1;
}

.outlier-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.outlier-icon {
    font-size: 24px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.outlier-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #fbbf24;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.outlier-description {
    color: #fde68a;
    font-size: 14px;
    margin-bottom: 16px;
    padding-left: 36px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.outlier-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.outlier-item {
    display: grid;
    grid-template-columns: 100px 1fr 80px 120px;
    gap: 12px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.75);
    border: 3px solid #f59e0b;
    border-radius: 6px;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
}

.outlier-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    border-color: #fbbf24;
    background: rgba(0, 0, 0, 0.85);
}

.outlier-slot {
    font-weight: 700;
    color: #fde68a;
    font-size: 13px;
    text-transform: capitalize;
}

.outlier-name {
    font-weight: 600;
    font-size: 14px;
}

.outlier-ilvl {
    text-align: right;
    font-weight: 600;
    color: #cbd5e1;
    font-size: 13px;
}

.outlier-diff {
    text-align: right;
    font-weight: 700;
    color: #fca5a5;
    font-size: 13px;
}

/* Responsive adjustments for Gear Tab */
@media (max-width: 768px) {
    .paperdoll-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .paperdoll-left,
    .paperdoll-right {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .paperdoll-left .paperdoll-slot,
    .paperdoll-right .paperdoll-slot {
        flex: 1;
        min-width: 150px;
    }

    .paperdoll-center {
        min-height: 200px;
    }

    .avg-ilvl-value {
        font-size: 20px;
    }

    .paperdoll-bottom {
        flex-direction: column;
    }

    .outlier-item {
        grid-template-columns: 80px 1fr;
        gap: 8px;
    }

    .outlier-ilvl,
    .outlier-diff {
        grid-column: 2;
        text-align: left;
    }
}

/* ===== STATS TAB ===== */
.stats-header {
    text-align: center;
    margin-bottom: 30px;
}

.stats-header h2 {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 600;
    color: #0f172a;
}

.stats-header .subtitle {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.stat-group {
    margin-bottom: 40px;
}

.stat-group h3 {
    margin: 0 0 20px;
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
}

.stat-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-item .stat-icon {
    font-size: 24px;
}

.stat-details {
    flex: 1;
}

.stat-item .stat-label {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 4px;
    text-transform: none;
    letter-spacing: normal;
}

.stat-item .stat-value {
    font-size: 20px;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}

/* ===== CURRENCIES TAB ===== */
.currencies-header {
    text-align: center;
    margin-bottom: 30px;
}

.currencies-header h2 {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 600;
    color: #0f172a;
}

.currencies-header .subtitle {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

/* ===== CURRENCIES TAB ===== */
.currencies-header {
    text-align: center;
    margin-bottom: 40px;
}

.currencies-header h2 {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
}

.currencies-header .subtitle {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.currency-category {
    margin-bottom: 32px;
}

.category-title {
    font-size: 16px;
    font-weight: 600;
    color: #64748b;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
}

.currency-category-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.currency-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    transition: all 0.2s;
}

.currency-row:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.currency-info {
    flex: 1;
    min-width: 0;
}

.currency-name {
    font-weight: 600;
    color: #0f172a;
    font-size: 15px;
    margin-bottom: 4px;
}

.currency-description {
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
}

.currency-visual {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.currency-sparkline {
    display: flex;
    align-items: center;
}

.currency-sparkline svg {
    display: block;
}

.currency-count {
    font-weight: 700;
    color: #3b82f6;
    font-size: 18px;
    min-width: 60px;
    text-align: right;
}


/* ===== NO DATA STATE ===== */
.no-data {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.no-data p {
    margin: 8px 0;
    font-size: 15px;
}

.no-data .muted {
    font-size: 14px;
    color: #94a3b8;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .character-nav {
        padding: 0 10px;
    }

    .character-content {
        padding: 0 10px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .gear-row {
        grid-template-columns: 100px 1fr 60px;
        gap: 12px;
    }

    .stat-items {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .character-header h1 {
        font-size: 24px;
    }

    .character-nav .nav-tab {
        padding: 10px 16px;
        font-size: 14px;
    }

    .stat-value {
        font-size: 28px;
    }

    .gear-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .gear-ilvl {
        text-align: left;
    }
}