/**
 * Dice Roller CSS
 * Styling for the HexGrinder dice roller component
 * Version: 1.0
 * Last Updated: November 29, 2025
 */

/* =====================
   DICE ROLLER STYLES
   ===================== */

.dice-roller-tab {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%) translateX(320px);
    z-index: 999;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.dice-roller-tab.open {
    transform: translateY(-50%) translateX(0);
}

.dice-roller-handle {
    background: linear-gradient(135deg, var(--accent-mystic) 0%, #5a3c9f 100%);
    color: white;
    padding: 1rem 0.5rem;
    cursor: pointer;
    border-radius: 4px 0 0 4px;
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
}

.dice-roller-handle:hover {
    background: linear-gradient(135deg, #8a6ccf 0%, #7a5cbf 100%);
    box-shadow: -4px 0 16px var(--glow-mystic);
}

.dice-roller-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-glow);
    border-right: none;
    border-radius: 4px 0 0 4px;
    width: 320px;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.5rem;
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.5);
}

.dice-roller-title {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--accent-gold);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dice-section {
    margin-bottom: 1.5rem;
}

.dice-section-title {
    font-family: 'Cinzel', serif;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.dice-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.dice-btn {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 0.75rem;
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    text-align: center;
}

.dice-btn:hover {
    background: var(--accent-mystic);
    border-color: var(--accent-mystic);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--glow-mystic);
}

.dice-btn:active {
    transform: translateY(0);
}

.dice-pool-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.dice-pool-select {
    flex: 1;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 0.5rem;
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.9rem;
    border-radius: 4px;
}

.dice-pool-input {
    width: 60px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    border-radius: 4px;
    text-align: center;
}

.modifier-controls {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    align-items: center;
}

.modifier-input {
    flex: 1;
    min-width: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    border-radius: 4px;
    text-align: center;
}

.modifier-btn {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 0.5rem;
    flex: 1;
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.modifier-btn.positive:hover {
    background: var(--accent-jade);
    border-color: var(--accent-jade);
    color: white;
}

.modifier-btn.negative:hover {
    background: var(--accent-ember);
    border-color: var(--accent-ember);
    color: white;
}

.dice-result-box {
    background: var(--bg-elevated);
    border: 2px solid var(--accent-gold);
    border-radius: 4px;
    padding: 1rem;
    margin-top: 1rem;
    text-align: center;
}

.dice-result-label {
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.dice-result-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent-gold);
}

.dice-result-details {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.dice-history {
    max-height: 200px;
    overflow-y: auto;
    background: var(--bg-elevated);
    border-radius: 4px;
    padding: 0.75rem;
}

.dice-history-entry {
    padding: 0.5rem;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dice-history-entry:last-child {
    border-bottom: none;
}

.dice-history-roll {
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-secondary);
}

.dice-history-result {
    font-family: 'JetBrains Mono', monospace;
    font-weight: bold;
    color: var(--accent-gold);
}

.clear-history-btn {
    width: 100%;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 0.5rem;
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    margin-top: 0.5rem;
    transition: all 0.2s;
}

.clear-history-btn:hover {
    background: var(--accent-ember);
    border-color: var(--accent-ember);
    color: white;
}

/* Scrollbar styling for dice history */
.dice-history::-webkit-scrollbar {
    width: 6px;
}

.dice-history::-webkit-scrollbar-track {
    background: var(--bg-card);
}

.dice-history::-webkit-scrollbar-thumb {
    background: var(--border-subtle);
    border-radius: 3px;
}

.dice-history::-webkit-scrollbar-thumb:hover {
    background: var(--border-glow);
}
