/* Custom styles for Närvarorapportering */

/* NFC input styling */
#nfc-input {
    font-family: monospace;
    font-size: 1.2em;
    text-align: center;
    background-color: #f8f9fa;
    border: 2px dashed #6c757d;
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 1rem 0;
}

#nfc-input:focus {
    border-color: #007bff;
    background-color: #e7f3ff;
}

/* Status messages */
.success {
    color: #28a745;
    font-weight: bold;
}

.error {
    color: #dc3545;
    font-weight: bold;
}

.warning {
    color: #ffc107;
    font-weight: bold;
}

/* Attendance buttons */
.attendance-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 1rem;
}

.attendance-btn:hover {
    background-color: #0056b3;
}

.attendance-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

/* Admin forms */
.admin-form {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .container {
        padding: 0.5rem;
    }
    
    .grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    article {
        margin-bottom: 1rem;
    }
    
    /* Larger touch targets */
    button, .btn {
        min-height: 44px;
        padding: 0.75rem 1rem;
    }
    
    input, select, textarea {
        min-height: 44px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Alarm type indicators */
.alarm-real {
    border-left: 4px solid #dc3545;
}

.alarm-test {
    border-left: 4px solid #ffc107;
}

.alarm-practice {
    border-left: 4px solid #28a745;
}

/* Table styling */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

table th,
table td {
    padding: 0.5rem;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

table th {
    background-color: #f8f9fa;
    font-weight: bold;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Alert styling */
.alert {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0.25rem;
    border: 1px solid transparent;
}

.alert-error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

/* Form enhancements */
fieldset {
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 1rem;
    margin: 1rem 0;
}

legend {
    font-weight: bold;
    padding: 0 0.5rem;
}

/* Department picker */
.form-control {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    margin: 0.5rem 0;
}
