/* Button and control styles */

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

/* Header buttons */
.header-btn {
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-radius: 6px;
    font-size: 0.9rem;
}

.header-btn:hover {
    background: var(--accent);
}

/* Grid toggle buttons */
.grid-toggle {
    display: flex;
    gap: 0.25rem;
    background: var(--bg-primary);
    padding: 0.25rem;
    border-radius: 6px;
}

.grid-btn {
    padding: 0.4rem 0.8rem;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 4px;
    font-size: 0.85rem;
}

.grid-btn:hover {
    color: var(--text-primary);
}

.grid-btn.active {
    background: var(--accent);
    color: var(--text-primary);
}

/* Quantity buttons */
.quantity-btn {
    padding: 0.75rem 2rem;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    min-width: 120px;
}

.quantity-btn:hover {
    background: var(--accent);
    transform: translateY(-2px);
}

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

/* Popup overlay */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.popup-overlay.visible {
    display: flex;
}

/* Popup content */
.popup {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    min-width: 280px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.popup h2 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    text-align: center;
}

.dice-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.dice-options label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.dice-options label:hover {
    background: var(--bg-primary);
}

.dice-options input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.popup-close-btn {
    width: 100%;
    padding: 0.75rem;
    background: var(--accent);
    color: var(--text-primary);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
}

.popup-close-btn:hover {
    filter: brightness(1.1);
}
