/*
 * Il Grigio TicketHub Styles
 * Minimal custom styles - using Tailwind CSS for most styling
 */

/* Print styles for tickets */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
        font-size: 12px;
    }
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Hide number input field arrows/spinners */
/* Chrome, Safari, Edge, Opera */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Form validation styles */
.form-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.form-success {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

/* Enhanced focus states for better accessibility */
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #dc2626;
    outline-offset: 2px;
}

/* Smooth transitions for form validation */
input, textarea, select {
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

/* Real-time validation feedback */
input.border-red-500 {
    animation: shake 0.5s ease-in-out;
}

input.border-green-500 {
    border-color: #10b981 !important;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Checkbox and radio custom styles */
input[type="checkbox"]:checked {
    background-color: #dc2626;
    border-color: #dc2626;
}

input[type="radio"]:checked {
    background-color: #dc2626;
    border-color: #dc2626;
}

/* Loading spinner for form submissions */
.loading-spinner {
    animation: spin 1s linear infinite;
}

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

/* Error message animations */
.checkout-error-message {
    animation: slideDown 0.3s ease-out;
}

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