/**
 * Global Button Component Styles
 * Reusable button styles matching Next.js Button component
 * 
 * @component Button
 * @version 1.0.0
 */

/* Base Button Styles */
.modeo-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 22px;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    text-decoration: none;
    outline: none;
    position: relative;
    white-space: nowrap;
}

.modeo-button:focus-visible {
    outline: 2px solid var(--primary, #cc1616);
    outline-offset: 2px;
}

.modeo-button:disabled,
.modeo-button--disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.modeo-button--loading {
    cursor: wait;
}

/* Button Text */
.modeo-button__text {
    display: inline-block;
}

/* Loading Spinner */
.modeo-button__spinner {
    display: inline-flex;
    align-items: center;
    margin-right: 0.5rem;
}

.modeo-button__spinner-icon {
    width: 1rem;
    height: 1rem;
    animation: spin 1s linear infinite;
}

.modeo-button__spinner-circle {
    opacity: 0.25;
}

.modeo-button__spinner-path {
    opacity: 0.75;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Button Sizes */
.modeo-button--sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.modeo-button--md {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.modeo-button--lg {
    padding: 0.75rem 2rem; /* px-8 py-3 */
    font-size: 0.875rem; /* text-base */
    line-height: 1.5rem;
}

@media (min-width: 640px) {
    .modeo-button--lg {
        padding: 1rem 2.5rem; /* sm:px-10 sm:py-4 */
        font-size: 1rem; /* sm:text-lg */
    }
}

@media (min-width: 1024px) {
    .modeo-button--lg {
        padding: 1.25rem 3rem; /* lg:px-12 lg:py-5 */
        font-size: 1.125rem; /* lg:text-lg */
    }
}

/* Button Variants */

/* Primary (red) */
.modeo-button--primary {
    background-color: var(--primary, #cc1616);
    color: #ffffff;
}

.modeo-button--primary:hover:not(:disabled):not(.modeo-button--disabled) {
    background-color: rgba(204, 22, 22, 0.9);
}

.modeo-button--primary:focus-visible {
    outline-color: rgba(204, 22, 22, 0.5);
}

/* Secondary (gray) */
.modeo-button--secondary {
    background-color: #4b5563;
    color: #ffffff;
}

.modeo-button--secondary:hover:not(:disabled) {
    background-color: #374151;
}

.modeo-button--secondary:focus-visible {
    outline-color: #6b7280;
}

/* Outline */
.modeo-button--outline {
    background-color: transparent;
    border: 1px solid #d1d5db;
    color: #374151;
}

.modeo-button--outline:hover:not(:disabled) {
    background-color: #f9fafb;
}

.modeo-button--outline:focus-visible {
    outline-color: var(--primary, #cc1616);
}

/* Ghost */
.modeo-button--ghost {
    background-color: transparent;
    color: #374151;
}

.modeo-button--ghost:hover:not(:disabled) {
    background-color: #f3f4f6;
}

.modeo-button--ghost:focus-visible {
    outline-color: #6b7280;
}

/* Light (white with border) */
.modeo-button--light {
    background-color: #ffffff;
    color: #111827;
    border: 1px solid #e5e7eb;
}

.modeo-button--light:hover:not(:disabled) {
    background-color: #f9fafb;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.modeo-button--light:focus-visible {
    outline-color: var(--primary, #cc1616);
}

/* Danger (red) */
.modeo-button--danger {
    background-color: #dc2626;
    color: #ffffff;
}

.modeo-button--danger:hover:not(:disabled) {
    background-color: #b91c1c;
}

.modeo-button--danger:focus-visible {
    outline-color: #ef4444;
}

/* White on Dark Background (for dark CTA sections) */
.modeo-button--white {
    background-color: #ffffff;
    color: #111827;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    font-weight: 600;
}

.modeo-button--white:hover:not(:disabled) {
    background-color: #f9fafb;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.modeo-button--white:focus-visible {
    outline-color: rgba(255, 255, 255, 0.5);
}

/* White Outline on Dark Background */
.modeo-button--white-outline {
    background-color: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    font-weight: 600;
}

.modeo-button--white-outline:hover:not(:disabled) {
    border-color: rgba(255, 255, 255, 0.6);
    background-color: rgba(255, 255, 255, 0.1);
}

.modeo-button--white-outline:focus-visible {
    outline-color: rgba(255, 255, 255, 0.5);
}

/* Promo Button - White with primary text, rounded-full, hover effect */
.modeo-button--promo {
    background-color: #ffffff;
    color: var(--primary, #cc1616);
    border-radius: 9999px; /* rounded-full */
    font-weight: 700;
    font-size: 0.875rem; /* text-sm */
    padding: 0.75rem 1.5rem; /* px-6 py-3 */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    position: relative;
}

.modeo-button--promo::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: var(--primary, #cc1616);
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    z-index: 0;
}

.modeo-button--promo:hover:not(:disabled)::before {
    transform: translateY(0);
}

.modeo-button--promo .modeo-button__text {
    position: relative;
    z-index: 10;
    transition: color 0.3s ease;
}

.modeo-button--promo:hover:not(:disabled) .modeo-button__text {
    color: #ffffff;
}

.modeo-button--promo:hover:not(:disabled) {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(1.05) translateY(-4px);
}

.modeo-button--promo:focus-visible {
    outline-color: rgba(255, 255, 255, 0.5);
    outline-offset: 4px;
}

/* Promo Coming Soon Button - Disabled style */
.modeo-button--promo-coming-soon {
    background-color: #6b7280; /* gray-500 - more visible than gray-400 */
    color: #ffffff;
    border-radius: 0.75rem; /* rounded-xl */
    font-weight: 600;
    font-size: 0.875rem; /* text-sm */
    padding: 0.75rem 1.5rem; /* px-6 py-3 */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
    cursor: not-allowed;
    opacity: 1; /* Full opacity - no fade */
    backdrop-filter: blur(4px);
    pointer-events: none;
}

.modeo-button--promo-coming-soon:hover {
    opacity: 1;
    transform: none;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
    background-color: #6b7280; /* Keep same color on hover */
}

/* Black/Dark Button - for product cards matching Next.js */
.modeo-button--black,
.modeo-button--dark {
    background-color: #000000;
    color: #ffffff;
    font-weight: 500;
}

.modeo-button--black:hover:not(:disabled):not(.modeo-button--disabled),
.modeo-button--dark:hover:not(:disabled):not(.modeo-button--disabled) {
    background-color: #111827; /* gray-900 */
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.modeo-button--black:focus-visible,
.modeo-button--dark:focus-visible {
    outline-color: rgba(0, 0, 0, 0.5);
    outline-offset: 2px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .modeo-button--lg {
        padding: 0.625rem 1.25rem;
        font-size: 0.9375rem;
    }
}

