/* GASHORSE Entry Form Styles */

/* Prevent page scroll when touching canvas */
canvas { 
    touch-action: none; 
}

/* Print styles */
@media print { 
    body { 
        background: white; 
    } 
    .no-print { 
        display: none; 
    } 
    .shadow-xl { 
        box-shadow: none; 
    } 
}

/* Form field styles */
.input-field { 
    width: 100%; 
    padding: 0.5rem; 
    border: 1px solid #d1d5db; 
    border-radius: 0.375rem; 
    outline: none;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: white;
}

/* Specific styles for date inputs - simplified to not interfere with native picker */
input[type="date"].input-field {
    cursor: pointer;
    position: relative;
}

/* Ensure date picker icon is visible and clickable in all browsers */
input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 1;
    position: relative;
    z-index: 2;
}

/* Make sure the entire date input is clickable */
input[type="date"] {
    position: relative;
}

input[type="date"]:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Firefox date picker styles */
input[type="date"]::-moz-focus-inner {
    border: 0;
    padding: 0;
}

.input-field:focus { 
    border-color: #3b82f6; 
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2); 
}

.input-field:invalid {
    border-color: #ef4444;
}

.input-field:invalid:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.label { 
    display: block; 
    font-size: 0.75rem; 
    font-weight: 700; 
    color: #374151; 
    margin-bottom: 0.25rem; 
}

/* Fee calculation input styles */
.fee-input { 
    text-align: right; 
    padding: 0.5rem; 
    border: 1px solid #d1d5db; 
    border-radius: 0.25rem;
    font-family: monospace;
    font-size: 14px;
}

.qty-input { 
    text-align: center; 
    padding: 0.5rem;
    width: 80px;
    border: 1px solid #d1d5db; 
    border-radius: 0.25rem;
    font-size: 14px;
}

/* Exhibitor section styles */
.exhibitor-section {
    position: relative;
    transition: all 0.3s ease;
}

.exhibitor-section:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.remove-exhibitor {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.2s;
}

.remove-exhibitor:hover {
    background-color: #dc2626;
}

/* Signature pad styles */
#signaturePad {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    background-color: #ffffff;
}

#signaturePad:hover {
    border-color: #9ca3af;
}

.signature-active {
    border-color: #3b82f6 !important;
    background-color: #f8fafc;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Form validation styles */
.error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2) !important;
}

.error-message {
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.success {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .grid-cols-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .qty-input {
        width: 60px;
        font-size: 12px;
    }
    
    .fee-input {
        font-size: 12px;
    }
    
    .label {
        font-size: 0.7rem;
    }
}

@media (max-width: 640px) {
    .grid-cols-3 {
        grid-template-columns: 1fr;
    }
    
    .exhibitor-section .grid-cols-3 {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .remove-exhibitor {
        position: static;
        margin: 0 auto 10px auto;
        width: 100px;
        height: 32px;
        border-radius: 16px;
        font-size: 12px;
    }
}

/* Animation classes */
.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Custom checkbox and radio styles */
input[type="checkbox"], input[type="radio"] {
    width: 1.2em;
    height: 1.2em;
    accent-color: #3b82f6;
}

/* Class checkbox grid styling */
.class-checkbox {
    width: 1.1em;
    height: 1.1em;
    margin-top: 2px;
}

.class-checkbox:checked + label {
    background-color: #eff6ff;
    border-color: #3b82f6;
}

.class-checkbox + label {
    transition: all 0.2s ease;
}

.class-checkbox + label:hover {
    background-color: #f8fafc;
}

/* Ensure checkbox containers work well in grid layout */
.class-checkbox-container {
    min-height: 3rem;
    display: flex;
    align-items: flex-start;
}

/* Button hover effects */
button:not(:disabled):hover {
    transform: translateY(-1px);
    transition: transform 0.2s ease;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Enhanced focus indicators for accessibility */
input:focus, 
select:focus, 
textarea:focus,
button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Class autocomplete dropdown styling */
datalist {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Fee calculation highlighting */
.fee-highlight {
    background-color: #fef3c7 !important;
    border-color: #f59e0b !important;
    transition: all 0.3s ease;
}

.fee-total {
    font-size: 1.25rem;
    font-weight: bold;
    color: #065f46;
}

/* Status indicators */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-online {
    background-color: #10b981;
}

.status-offline {
    background-color: #ef4444;
}

.status-loading {
    background-color: #f59e0b;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}