/* ========================================
   MINIMALIST BRUTALIST BUTTONS
   "Lightweight, Functional, Beautiful"
   ======================================== */

/* GLOBAL RESET FOR BUTTONS */
button,
input[type="submit"],
input[type="reset"],
input[type="button"],
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    text-decoration: none;
    cursor: pointer;
    font-family: 'Courier New', Courier, monospace; /* Monospace for technical feel */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1;
    border-radius: 0; /* Strict square corners */
    transition: all 0.15s ease-in-out; /* Fast, crisp transition */
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: none;
    margin: 0;
    outline: none;
    user-select: none;
}

/* Focus State for Accessibility */
button:focus-visible,
.btn:focus-visible,
input[type="submit"]:focus-visible {
    outline: 2px dashed var(--red);
    outline-offset: 4px;
}

/* ----------------------------------------
   SIZES
   ---------------------------------------- */

/* Tiny (Product Cards, Dense Tables) */
.btn-xs {
    padding: 6px 10px;
    font-size: 10px;
    border-width: 1px;
    height: 24px;
}

/* Small (Filters, Secondary Actions) */
.btn-sm {
    padding: 8px 16px;
    font-size: 11px;
    border-width: 1px;
    height: 32px;
}

/* Medium (Default - Forms, Standard Links) */
.btn-md,
.btn {
    padding: 12px 24px;
    font-size: 12px;
    border-width: 2px;
    height: 40px;
}

/* Large (Hero, Main CTAs) */
.btn-lg {
    padding: 16px 32px;
    font-size: 14px;
    border-width: 2px;
    height: 48px;
    letter-spacing: 2px;
}

/* ----------------------------------------
   VARIANTS
   ---------------------------------------- */

/* PRIMARY: Black Solid */
.btn-primary {
    background-color: var(--black);
    color: var(--white);
    border: 2px solid var(--black);
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--white);
    color: var(--black);
    /* No shadow, no translate - strictly color inversion */
}

/* SECONDARY: White Solid (Outline feel) */
.btn-secondary {
    background-color: var(--white);
    color: var(--black);
    border: 2px solid var(--black);
}

.btn-secondary:hover:not(:disabled) {
    background-color: var(--black);
    color: var(--white);
}

/* DANGER: Red Accents */
.btn-danger {
    background-color: var(--white);
    color: var(--red);
    border: 2px solid var(--red);
}

.btn-danger:hover:not(:disabled) {
    background-color: var(--red);
    color: var(--white);
}

/* GHOST: Text Only (Minimalist) */
.btn-ghost {
    background-color: transparent;
    color: var(--black);
    border: 2px solid transparent;
    padding-left: 0;
    padding-right: 0;
}

.btn-ghost:hover:not(:disabled) {
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* DISABLED STATE */
.btn:disabled,
button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(100%);
    pointer-events: none;
}

/* ----------------------------------------
   UTILITIES
   ---------------------------------------- */

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

/* Icon Support */
.btn svg,
.btn .icon {
    width: 1.2em;
    height: 1.2em;
    fill: currentColor;
}

.btn-icon-left svg { margin-right: 8px; }
.btn-icon-right svg { margin-left: 8px; }

/* ----------------------------------------
   CONTEXT-SPECIFIC OVERRIDES (Mappings)
   ---------------------------------------- */

/* Map legacy .btn-submit to Primary */
.btn-submit {
    @extend .btn-primary;
    @extend .btn-md;
}

/* Map legacy .add-to-cart-btn to Primary */
.add-to-cart-btn {
    @extend .btn-primary;
    @extend .btn-md;
}

/* Map legacy .btn-large to Large */
.btn-large {
    @extend .btn-lg;
}
