/* MOBILE FIX - LIGHT THEME - Load this AFTER main CSS */

/* Force light theme on body when viewing character sheet */
body:has(.roc-character-sheet),
html:has(.roc-character-sheet) {
    background: #f8fafc !important;
}

/* Character Sheet Container */
div.roc-character-sheet,
.roc-character-sheet,
[class*="roc-character-sheet"] {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
    padding: 40px 20px !important;
    min-height: 100vh !important;
    margin: 0 auto !important;
    max-width: 1400px !important;
}

/* Header */
div.roc-sheet-header,
.roc-sheet-header,
.roc-character-sheet .roc-sheet-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 24px !important;
    padding: 40px !important;
    display: flex !important;
    align-items: center !important;
    gap: 30px !important;
    margin-bottom: 30px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08) !important;
}

/* Icon */
span.roc-sheet-icon,
.roc-sheet-icon,
.roc-character-sheet .roc-sheet-icon {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
    width: 120px !important;
    height: 120px !important;
    border-radius: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 4em !important;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25) !important;
}

/* Titles */
.roc-sheet-title h2,
.roc-character-sheet h2 {
    color: #1e293b !important;
    font-size: 3em !important;
    font-weight: 800 !important;
    margin: 0 0 10px 0 !important;
}

.roc-sheet-title h3,
.roc-character-sheet h3 {
    color: #6366f1 !important;
    font-weight: 600 !important;
    font-size: 1.3em !important;
    margin: 0 !important;
    text-transform: uppercase !important;
}

/* Sections */
div.roc-sheet-section,
.roc-sheet-section,
.roc-character-sheet .roc-sheet-section {
    background: #ffffff !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 20px !important;
    padding: 30px !important;
    margin-bottom: 24px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04) !important;
}

.roc-sheet-section h4,
.roc-character-sheet h4 {
    color: #1e293b !important;
    font-size: 1.4em !important;
    font-weight: 700 !important;
    margin: 0 0 24px 0 !important;
    padding-bottom: 16px !important;
    border-bottom: 2px solid #e2e8f0 !important;
}

/* Stats Grid */
.roc-stats-grid,
.roc-character-sheet .roc-stats-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
    gap: 16px !important;
}

/* Stat Items */
.roc-stat-item,
.roc-character-sheet .roc-stat-item {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%) !important;
    border: 2px solid #e2e8f0 !important;
    border-left: 4px solid #6366f1 !important;
    border-radius: 16px !important;
    padding: 24px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}

.roc-stat-item .roc-stat-icon {
    font-size: 2.5em !important;
}

.roc-stat-item .roc-stat-label {
    color: #64748b !important;
    font-size: 0.9em !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
}

.roc-stat-item .roc-stat-value {
    color: #1e293b !important;
    font-size: 2em !important;
    font-weight: 800 !important;
}

/* Paragraphs */
.roc-sheet-section p {
    color: #475569 !important;
    line-height: 1.8 !important;
}

.roc-sheet-section p strong {
    color: #6366f1 !important;
}

/* Inventory Items */
.roc-sheet-section .roc-sheet-inventory li.roc-inventory-item-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    border: 2px solid #e2e8f0 !important;
    border-left: 4px solid #6366f1 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

.roc-sheet-section .roc-item-header-row {
    background: #fafafa !important;
}

.roc-sheet-section .roc-item-name {
    color: #1e293b !important;
}

.roc-sheet-section .roc-item-details {
    background: #fafafa !important;
    border-top: 1px solid #e2e8f0 !important;
}

/* MOBILE SPECIFIC */
@media (max-width: 768px) {
    div.roc-character-sheet,
    .roc-character-sheet {
        padding: 20px 15px !important;
    }
    
    div.roc-sheet-header,
    .roc-sheet-header {
        flex-direction: column !important;
        text-align: center !important;
        padding: 30px 20px !important;
        gap: 20px !important;
    }
    
    span.roc-sheet-icon,
    .roc-sheet-icon {
        width: 100px !important;
        height: 100px !important;
        font-size: 3em !important;
        margin: 0 auto !important;
    }
    
    .roc-sheet-title h2 {
        font-size: 2em !important;
        text-align: center !important;
    }
    
    .roc-sheet-title h3 {
        font-size: 1.1em !important;
        text-align: center !important;
    }
    
    .roc-stats-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    
    .roc-stat-item {
        padding: 20px !important;
    }
    
    .roc-stat-item .roc-stat-value {
        font-size: 1.8em !important;
    }
    
    .roc-sheet-section {
        padding: 20px !important;
    }
    
    .roc-sheet-section h4 {
        font-size: 1.2em !important;
    }
    
    /* Inventory mobile fixes */
    .roc-sheet-section .roc-item-header-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
        padding: 16px !important;
    }
    
    .roc-sheet-section .roc-item-meta {
        width: 100% !important;
        justify-content: space-between !important;
    }
    
    .roc-sheet-section .roc-item-name-wrap {
        width: 100% !important;
    }
    
    .roc-sheet-section .roc-item-details {
        padding: 16px !important;
    }
}

@media (max-width: 480px) {
    div.roc-character-sheet,
    .roc-character-sheet {
        padding: 15px 10px !important;
    }
    
    div.roc-sheet-header,
    .roc-sheet-header {
        padding: 25px 15px !important;
    }
    
    span.roc-sheet-icon,
    .roc-sheet-icon {
        width: 80px !important;
        height: 80px !important;
        font-size: 2.5em !important;
    }
    
    .roc-sheet-title h2 {
        font-size: 1.6em !important;
    }
    
    .roc-sheet-title h3 {
        font-size: 1em !important;
    }
    
    .roc-sheet-section {
        padding: 16px !important;
    }
    
    .roc-sheet-section h4 {
        font-size: 1.1em !important;
    }
    
    .roc-stat-item {
        padding: 16px !important;
    }
    
    .roc-stat-item .roc-stat-value {
        font-size: 1.5em !important;
    }
    
    .roc-sheet-section .roc-item-header-row {
        padding: 14px !important;
    }
    
    .roc-sheet-section .roc-item-details {
        padding: 14px !important;
    }
}
