/**
 * Pottershaus Design System — Global Button Component (buttons.css)
 * Reusable, brand-aligned, accessible button components.
 * Can be used on <a> or <button> elements across the entire website.
 */

/* ==========================================================================
   1. Base Button (.btn)
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 9999px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 1.25;
    padding: 0.875rem 1.75rem;
    white-space: nowrap;
    text-decoration: none !important;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    -webkit-user-select: none;
    outline: none;
    box-sizing: border-box;
}

.btn:hover {
    text-decoration: none !important;
}

.btn:active {
    transform: scale(0.97) !important;
}

.btn:focus-visible {
    outline: 2px solid rgba(0, 102, 204, 0.5);
    outline-offset: 3px;
}

.btn:disabled,
.btn[aria-disabled="true"] {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
    transform: none !important;
}

/* ==========================================================================
   2. Core Hierarchy: Primary (Blue), Secondary, Tertiary (Ghost), Quaternary (Red)
   ========================================================================== */

/* ── 1. PRIMARY: Signature Glossy Blue Gradient (Default Main Action) ── */
.btn-primary,
.btn-accent,
.btn-blue {
    background: linear-gradient(180deg, #1fa2ff 0%, #0066cc 100%);
    color: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 20px rgba(0, 102, 204, 0.2), inset 0 2px 3px rgba(255, 255, 255, 0.4);
}

.btn-primary:hover,
.btn-accent:hover,
.btn-blue:hover {
    background: linear-gradient(180deg, #3bb0ff 0%, #005bb5 100%);
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(0, 102, 204, 0.3), inset 0 2px 3px rgba(255, 255, 255, 0.45);
}

.btn-primary:active,
.btn-accent:active,
.btn-blue:active {
    background: linear-gradient(180deg, #0066cc 0%, #0052a3 100%);
}

/* ── 2. SECONDARY: Neutral Charcoal / Dark Action ── */
.btn-secondary,
.btn-dark {
    background-color: #1c1b18;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.btn-secondary:hover,
.btn-dark:hover {
    background-color: #2c2b27;
    border-color: #2c2b27;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
}

/* ── 3. TERTIARY (Ghost): Subtle Text Action with Arrow ── */
.btn-ghost,
.btn-tertiary {
    background-color: transparent;
    color: rgba(44, 44, 42, 0.7) !important;
    border: none;
    padding: 0.6rem 1rem;
    font-weight: 500;
}

.btn-ghost:hover,
.btn-tertiary:hover {
    color: #0066cc !important;
    background-color: rgba(0, 102, 204, 0.06);
}

/* ── 4. QUATERNARY: Solid Brand Crimson Red (#b83028) ── */
.btn-quaternary,
.btn-red,
.btn-brand {
    background-color: #b83028;
    color: #ffffff !important;
    border: 1px solid #b83028;
    box-shadow: 0 4px 14px rgba(184, 48, 40, 0.22);
}

.btn-quaternary:hover,
.btn-red:hover,
.btn-brand:hover {
    background-color: #a42b24;
    border-color: #a42b24;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(184, 48, 40, 0.32);
}

.btn-quaternary:active,
.btn-red:active,
.btn-brand:active {
    background-color: #8f201a;
    border-color: #8f201a;
}

/* ==========================================================================
   3. Contextual Helpers (Glass, White, Outline)
   ========================================================================== */

/* Glass — Frosted Translucent Pill (for Hero / Media overlays) */
.btn-glass {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #2c2c2a !important;
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04), inset 0 2px 2px rgba(255, 255, 255, 0.9);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.75);
    color: #111827 !important;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08), inset 0 2px 2px rgba(255, 255, 255, 1);
}

/* White — Solid White on Dark Backgrounds */
.btn-white {
    background-color: #ffffff;
    color: #1c1b18 !important;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.btn-white:hover {
    background-color: rgba(255, 255, 255, 0.92);
    color: #1c1b18 !important;
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Outline — Neutral Dark Border */
.btn-outline {
    background-color: transparent;
    color: #1c1b18 !important;
    border: 1.5px solid rgba(28, 27, 24, 0.22);
}

.btn-outline:hover {
    background-color: #1c1b18;
    border-color: #1c1b18;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

/* Outline White — For Dark Cards & Sections */
.btn-outline-white {
    background-color: rgba(17, 17, 17, 0.8);
    color: #ffffff !important;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
}

.btn-outline-white:hover {
    background-color: #ffffff;
    border-color: #ffffff;
    color: #1c1b18 !important;
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.15);
}

/* Outline Red — Brand Accent Outline */
.btn-outline-red {
    background-color: transparent;
    color: #b83028 !important;
    border: 1.5px solid #b83028;
}

.btn-outline-red:hover {
    background-color: #b83028;
    border-color: #b83028;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(184, 48, 40, 0.25);
}

/* Arrow micro-animation helper */
.btn .btn-arrow {
    display: inline-block;
    transition: transform 0.2s ease;
}

.btn:hover .btn-arrow {
    transform: translateX(4px);
}

/* ==========================================================================
   4. Sizing Scale
   ========================================================================== */

/* Small — Compact filters, newsletter inputs, micro CTAs */
.btn-sm {
    font-size: 0.75rem;
    padding: 0.55rem 1.15rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* Large — Prominent Hero & Landing Page CTAs */
.btn-lg {
    font-size: 1rem;
    padding: 1.125rem 2.25rem;
    font-weight: 600;
}

/* Block — Full Width Helper */
.btn-block {
    display: flex;
    width: 100%;
}
