/* iRDA-X Custom Styles */

/* CSS Variables for consistent theming */
:root {
    --primary-dark: #1243A6;
    --primary: #1D64F2;
    --dark: #011C40;
    --light: #F2EED8;
    --accent: #F24822;
}

/* Custom utilities */
.text-primary-dark {
    color: var(--primary-dark);
}

.text-primary {
    color: var(--primary);
}

.text-dark {
    color: var(--dark);
}

.text-light {
    color: var(--light);
}

.text-accent {
    color: var(--accent);
}

.bg-primary-dark {
    background-color: var(--primary-dark);
}

.bg-primary {
    background-color: var(--primary);
}

.bg-dark {
    background-color: var(--dark);
}

.bg-light {
    background-color: var(--light);
}

.bg-accent {
    background-color: var(--accent);
}

.border-primary-dark {
    border-color: var(--primary-dark);
}

.border-primary {
    border-color: var(--primary);
}

/* Custom components */
.alert {
    border-radius: 0.375rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background-color: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-warning {
    background-color: #fef3c7;
    color: #d97706;
    border: 1px solid #fde68a;
}

.alert-info {
    background-color: #dbeafe;
    color: #1d4ed8;
    border: 1px solid #93c5fd;
}

/* HTMX Loading states */
.htmx-request {
    opacity: 0.6;
    cursor: wait;
}

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

.htmx-indicator {
    display: none;
}

/* Form enhancements - Using CSS instead of @apply for CDN compatibility */
.form-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    transition: all 0.2s ease-in-out;
}

.form-input:focus {
    outline: none;
    ring: 2px;
    --tw-ring-color: var(--primary);
    border-color: transparent;
}

.btn-primary {
    padding: 0.5rem 1rem;
    background-color: var(--primary);
    color: white;
    border-radius: 0.375rem;
    transition: background-color 0.2s ease-in-out;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    padding: 0.5rem 1rem;
    background-color: #e5e7eb;
    color: #374151;
    border-radius: 0.375rem;
    transition: background-color 0.2s ease-in-out;
    border: none;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: #d1d5db;
}

.btn-accent {
    padding: 0.5rem 1rem;
    background-color: var(--accent);
    color: white;
    border-radius: 0.375rem;
    transition: background-color 0.2s ease-in-out;
    border: none;
    cursor: pointer;
}

.btn-accent:hover {
    background-color: #dc2626;
}

/* Mobile menu animation */
#mobile-menu {
    transition: all 0.3s ease-in-out;
}

#mobile-menu.show {
    display: block;
    animation: slideDown 0.3s ease-in-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Focus styles for accessibility */
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    header,
    footer,
    nav {
        display: none !important;
    }
}

/* Responsive utilities */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Responsive text improvements */
@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Better mobile touch targets */
    button, 
    .btn-primary,
    .btn-secondary,
    .btn-accent,
    a[class*="btn"] {
        min-height: 44px;
        padding: 12px 16px;
    }
    
    /* Mobile form improvements */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Better responsive images */
img {
    max-width: 100%;
    height: auto;
}

/* Mobile-first navigation */
@media (max-width: 768px) {
    .mobile-hidden {
        display: none;
    }
}

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles will be added here */
}