/* Front HTMX Loading Indicator Styles */
/* Debug: Show when htmx-request is active */
body.htmx-request {
    outline: 2px solid red !important;
}

/* Global progress bar at top */
.htmx-indicator.fixed {
    opacity: 0;
    transition: opacity 200ms ease-in;
}

body.htmx-request .htmx-indicator.fixed {
    opacity: 1;
}

/* Button indicators */
button .htmx-indicator {
    display: none;
}

form.htmx-request button .htmx-indicator {
    display: inline;
}

form.htmx-request button > span:not(.htmx-indicator) {
    display: none;
}

/* Front Mobile App Styles */
.card {
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.primary-btn {
    @apply bg-gradient-to-r from-purple-600 to-purple-700 hover:from-purple-700 hover:to-purple-800;
}

.primary-purple {
    color: #8b5cf6;
}

.bg-primary-purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.bg-primary-purple-light {
    background-color: rgba(139, 92, 246, 0.1);
}

.border-primary-purple-light {
    border-color: rgba(139, 92, 246, 0.2);
}

.bg-white-alpha-20 {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Modal overlay animation */
.modal-overlay {
    backdrop-filter: blur(4px);
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.2s ease-out;
}

.modal-content {
    animation: slideUp 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Chart container */
.chart-container {
    position: relative;
    height: 150px;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
}

/* HTMX boost transitions */
body.htmx-swapping {
    opacity: 0.8;
    transition: opacity 0.2s ease-out;
}

/* Loading states */
.loading {
    pointer-events: none;
    opacity: 0.6;
}

/* Success/Error messages */
.alert-success {
    @apply bg-green-50 border border-green-200 text-green-800 px-4 py-3 rounded-lg;
}

.alert-error {
    @apply bg-red-50 border border-red-200 text-red-800 px-4 py-3 rounded-lg;
}

.alert-warning {
    @apply bg-yellow-50 border border-yellow-200 text-yellow-800 px-4 py-3 rounded-lg;
}

.alert-info {
    @apply bg-blue-50 border border-blue-200 text-blue-800 px-4 py-3 rounded-lg;
}

/* Modal and loader styles */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    max-height: 80vh;
}

.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #7f1eed;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
