/**
 * ALO Elements Frontend CSS
 * Button styling with CSS custom properties
 */

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

.alo-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none !important;
    border: none;
    border-bottom: none !important;
    border-radius: 8px !important;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    flex-direction: row;
    
    /* CSS custom properties for dynamic color */
    background-color: var(--alo-btn-bg, #0066cc);
    color: #ffffff;
    
    /* Prevent text selection */
    user-select: none;
    -webkit-user-select: none;
}

/* Icon position classes removed - handled in HTML order */

.alo-btn:hover {
    background-color: color-mix(in oklch, var(--alo-btn-bg, #0066cc) 85%, black);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    text-decoration: none !important;
}

.alo-btn:hover i,
.alo-btn:hover span,
.alo-btn:hover a,
.alo-btn:hover *,
a.alo-btn:hover,
a.alo-btn:hover::after,
a.alo-btn:hover::before {
    text-decoration: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

.alo-btn:active {
    transform: translateY(0);
    background-color: color-mix(in oklch, var(--alo-btn-bg, #0066cc) 75%, black);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.alo-btn:focus {
    outline: 3px solid color-mix(in oklch, var(--alo-btn-bg, #0066cc) 50%, transparent);
    outline-offset: 2px;
}

/* Icon styling within button */
.alo-btn i {
    font-size: 1.1em;
    line-height: 1;
    color: #ffffff !important;
}

.alo-btn span {
    line-height: 1.5;
    color: #ffffff;
}

.alo-btn,
.alo-btn:hover,
.alo-btn:active,
.alo-btn:focus,
.alo-btn:visited {
    color: #ffffff;
    text-decoration: none !important;
}

/* ============================================
   BUTTON SIZE VARIATIONS
   ============================================ */

/* Small button (can be added via modifier class) */
.alo-btn.alo-btn-small {
    padding: 8px 24px;
    font-size: 14px;
}

/* Large button (can be added via modifier class) */
.alo-btn.alo-btn-large {
    padding: 16px 40px;
    font-size: 18px;
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

@media (max-width: 768px) {
    .alo-btn {
        padding: 10px 24px;
        font-size: 15px;
    }
    
    .alo-btn.alo-btn-large {
        padding: 14px 32px;
        font-size: 17px;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* High contrast mode support */
@media (prefers-contrast: high) {
    .alo-btn {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .alo-btn {
        transition: background-color 0.2s ease;
    }
    
    .alo-btn:hover,
    .alo-btn:active {
        transform: none;
    }
}

/* Focus visible for keyboard navigation */
.alo-btn:focus-visible {
    outline: 3px solid color-mix(in oklch, var(--alo-btn-bg, #0066cc) 50%, transparent);
    outline-offset: 2px;
}
