/**
 * Button Styles
 *
 * Core button components used across the application.
 * Feature-specific button variants remain in their page CSS files.
 *
 * Also includes the ghost-nav-row pattern (Back / Next above a hero card),
 * shared by the quiz and hand replay views.
 */

/* Shared base for all standard-height buttons */
.btn-primary,
.btn-secondary,
.btn-save,
.btn-cancel,
.btn-outline-accent {
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

/* Primary Button - Main CTA style */
.btn-primary {
    padding: 0 16px;
    background: var(--accent);
    border: none;
    color: white;
}

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

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background: var(--disabled-bg);
    color: var(--disabled-text);
}

/* Secondary Button - Subtle/outline style */
.btn-secondary {
    padding: 0 16px;
    background: transparent;
    color: var(--text);
    border: 1px solid rgba(255,255,255,0.2);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.35);
}

/* Save/Cancel button pair for modals */
.btn-save {
    padding: 0 20px;
    background: var(--accent);
    color: white;
    border: none;
}

.btn-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-cancel {
    padding: 0 20px;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.btn-cancel:hover {
    background: rgba(255,255,255,0.05);
}

/* Outline accent - accent-colored outline */
.btn-outline-accent {
    padding: 0 20px;
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}

.btn-outline-accent:hover {
    background: rgba(var(--accent-rgb), 0.1);
}

/* Reveal button (for showing hidden content) */
.btn-reveal {
    padding: 6px 12px;
    background: rgba(var(--accent-rgb), 0.15);
    border: 1px solid var(--accent);
    border-radius: 4px;
    color: var(--accent);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-reveal:hover {
    background: var(--accent);
    color: white;
}

.btn-reveal.revealed {
    background: rgba(var(--action-call-rgb), 0.15);
    border-color: var(--winner-green);
    color: var(--winner-green);
}

/* Responsive button text: show full text by default, short text on mobile */
.btn-short-text { display: none; }
.btn-full-text  { display: inline; }

@media (max-width: 768px) {
    .btn-short-text { display: inline; }
    .btn-full-text  { display: none; }
}

/* =====================================================================
   HERO CARD TITLE — centered heading above a content card
   Shared by the quiz (practice) and hand replay (sessions) views.
   ===================================================================== */

.hero-card-title {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--text);
    margin-top: 10px;
    margin-bottom: 2px;
    text-align: center;
}
@media (max-width: 768px) {
    .hero-card-title { font-size: 1.4rem; }
}

/* =====================================================================
   GHOST NAV ROW — Back / Next above a hero card
   Shared by the quiz (practice) and hand replay (sessions) views.
   ===================================================================== */

.ghost-nav-row {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 4px;
}
.ghost-nav-spacer { flex: 1; }
.ghost-nav-btn {
    height: 36px;
    padding: 0 8px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.875rem;
    opacity: 0.75;
    cursor: pointer;
    transition: color 0.15s, opacity 0.15s;
}
.ghost-nav-btn:hover {
    color: var(--accent);
    opacity: 1;
    background: transparent;
}
.ghost-nav-btn:disabled {
    opacity: 0.3;
    cursor: default;
    color: var(--text-muted);
}
@media (max-width: 768px) {
    .ghost-nav-row { margin-bottom: 5px; }
}

/* =====================================================================
   INTEGRATED TOOLBAR BUTTON — ghost style for buttons embedded inside
   a content card toolbar (Hand Replay card, Odds Calculator bar).
   Transparent border at rest; visible on hover/active.
   ===================================================================== */

.btn-integrated {
    height: 42px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    opacity: 0.75;
    flex-shrink: 0;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s, border-color 0.15s, opacity 0.15s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.btn-integrated svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-integrated.btn-icon-only { padding: 0; width: 42px; }
.btn-integrated.btn-icon-only svg { width: 20px; height: 20px; }
.btn-integrated:hover {
    background: rgba(255,255,255,0.07);
    color: var(--text);
    opacity: 1;
}
.btn-integrated.active {
    background: rgba(var(--accent-rgb), 0.12);
    box-shadow: inset 0 0 0 1px var(--accent);
    color: var(--accent);
    opacity: 1;
}
.btn-integrated:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* =====================================================================
   ICON BUTTON — standard page-chrome icon-only button (row actions,
   inline toolbars). Visible border at rest; accent ring when active.
   Per ui-standards.md spec.
   ===================================================================== */

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.btn-icon:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.25);
    color: var(--text);
}
.btn-icon.active {
    background: rgba(var(--accent-rgb), 0.12);
    border-color: var(--accent);
    color: var(--accent);
}
.btn-icon.danger:hover {
    background: rgba(var(--error-rgb), 0.1);
    border-color: rgba(var(--error-rgb), 0.3);
    color: var(--error);
}

/* btn-sm height enforcement — base buttons are 40px; sm variant is 36px */
.btn-primary.btn-sm,
.btn-secondary.btn-sm,
.btn-save.btn-sm,
.btn-cancel.btn-sm,
.btn-outline-accent.btn-sm {
    height: 36px;
    padding: 0 10px;
    font-size: 0.85rem;
}
