/**
 * SDC Theme Button Primitives
 *
 * Button classes based on Figma button specifications
 *
 * @package SDC_Theme
 * @since 0.1.0
 */

/* ========================================
   BASE BUTTON STYLES
   ======================================== */

.btn {
    display: inline-flex;
    align-items: stretch;
    justify-content: center;
    gap: var(--button-gap);
    font-family: var(--font-primary);
    font-weight: var(--font-weight-bold);
    line-height: var(--leading-tight);
    text-decoration: none;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.btn:hover {
    opacity: 0.9;
}

.btn:focus {
    outline: none;
}

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

/* ========================================
   BUTTON VARIANTS
   ======================================== */

/* Primary Button - Red background */
.btn-primary {
    background-color: var(--color-accent);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: var(--color-accent);
    filter: brightness(1.1);
}

/* Secondary Button - Medium Blue background */
.btn-secondary {
    background-color: var(--color-secondary);
    color: var(--color-white);
}

.btn-secondary:hover {
    background-color: var(--color-secondary);
    filter: brightness(1.1);
}

/* ========================================
   BUTTON SIZES
   ======================================== */

/* Small Button */
.btn-sm {
    padding: var(--space-md) var(--space-lg);
    font-size: var(--text-button-sm);
}

/* Medium Button */
.btn-md {
    padding: var(--space-lg) var(--space-xl);
    font-size: var(--text-button-md);
}

/* Large Button */
.btn-lg {
    padding: var(--space-lg) var(--space-xl);
    font-size: var(--text-button-lg);
    gap: var(--button-gap-lg);
}

/* ========================================
   BUTTON TEXT WRAPPER
   ======================================== */

.btn-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* ========================================
   BUTTON WITH ARROW
   ======================================== */

.btn-with-arrow {
    position: relative;
}

.btn-with-arrow .btn-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
}

.btn-with-arrow .btn-arrow::after {
    content: "";
    width: 16px;
    height: 16px;
    background-color: currentColor;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3Cpolyline points='12 5 19 12 12 19'%3E%3C/polyline%3E%3C/svg%3E");
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3Cpolyline points='12 5 19 12 12 19'%3E%3C/polyline%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
}

/* Arrow size variations */
.btn-sm .btn-arrow::after {
    width: 16px;
    height: 16px;
}

.btn-md .btn-arrow::after {
    width: 19px;
    height: 18px;
}

.btn-lg .btn-arrow::after {
    width: 24px;
    height: 24px;
}

/* ========================================
   OUTLINE BUTTON VARIANT
   ======================================== */

.btn-outline {
    background-color: transparent;
    border: 2px solid currentColor;
}

.btn-outline.btn-primary {
    color: var(--color-accent);
}

.btn-outline.btn-secondary {
    color: var(--color-secondary);
}

/* ========================================
   GHOST BUTTON VARIANT
   ======================================== */

.btn-ghost {
    background-color: transparent;
    color: var(--color-contrast);
}

.btn-ghost:hover {
    background-color: var(--color-muted);
}

/* ========================================
   FULL WIDTH BUTTON
   ======================================== */

.btn-full {
    width: 100%;
}
