/**
 * Card Games - Shared Button Styles
 * Common button styling used across all solitaire games
 * Import this after variables.css
 */

/* ==========================================================================
   Base Button
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    background: var(--button-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-sm, 4px);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: var(--text-sm);
    font-weight: var(--font-weight-medium);
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    transition: 
        background-color var(--transition-fast),
        border-color var(--transition-fast),
        color var(--transition-fast),
        box-shadow var(--transition-fast),
        transform var(--transition-fast);
}

.btn:hover {
    background: var(--button-hover);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: scale(0.95);
}

.btn:focus-visible {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}

/* Disabled state */
.btn:disabled,
.btn[aria-disabled="true"] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ==========================================================================
   Button Variants
   ========================================================================== */

/* Primary button - accent color border */
.btn--primary {
    border-color: var(--accent-gold);
}

.btn--primary:hover {
    border-color: var(--accent-gold-light);
}

/* Large button - for CTAs */
.btn--lg {
    padding: var(--space-md) var(--space-xl);
    font-size: var(--text-base);
    border-radius: var(--border-radius, 6px);
}

/* Small button - for compact layouts */
.btn--sm {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--text-xs);
}

/* Full width button */
.btn--block {
    width: 100%;
}

/* ==========================================================================
   Button Colors
   ========================================================================== */

/* Success button */
.btn--success {
    background: var(--state-success);
    border-color: var(--state-success);
}

.btn--success:hover {
    background: #6fba80;
}

/* ==========================================================================
   Control Buttons (Game Controls)
   ========================================================================== */

.controls {
    display: flex;
    gap: var(--space-sm);
}

.controls .btn {
    /* Control buttons are compact */
}

/* ==========================================================================
   Game Header Buttons
   ========================================================================== */

.game-header .controls {
    display: flex;
    gap: var(--space-sm);
}

/* ==========================================================================
   Modal Buttons (Win/Rules)
   ========================================================================== */

.win-message .btn,
.rules-content .btn {
    padding: var(--space-md) var(--space-xl);
    border-color: var(--accent-gold);
    font-size: var(--text-base);
}

.win-message .btn:hover,
.rules-content .btn:hover {
    background: var(--button-hover);
    border-color: var(--accent-gold-light);
}

/* Full width button in modals */
.win-message .btn--block,
.rules-content .btn--block {
    margin-top: var(--space-lg);
}

/* ==========================================================================
   Play Button (Game Cards on Homepage)
   ========================================================================== */

.play-btn {
    display: inline-block;
    width: 100%;
    margin-top: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: linear-gradient(135deg, var(--button-bg) 0%, var(--button-hover) 100%);
    border: 1px solid var(--accent-gold);
    border-radius: var(--border-radius, 4px);
    color: white;
    font-family: var(--font-family);
    font-size: var(--text-sm);
    font-weight: var(--font-weight-bold);
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: 
        background var(--transition-fast),
        border-color var(--transition-fast),
        box-shadow var(--transition-fast);
}

.play-btn:hover {
    background: linear-gradient(135deg, var(--button-hover) 0%, #5faa70 100%);
    border-color: var(--accent-gold-light);
    box-shadow: var(--shadow-md);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 700px) {
    .btn {
        padding: var(--space-xs) var(--space-sm);
        font-size: var(--text-xs);
    }
    
    .btn--lg {
        padding: var(--space-sm) var(--space-lg);
        font-size: var(--text-sm);
    }
    
    .controls {
        flex-wrap: wrap;
    }
}
