/**
 * Regent Exam Plugin - Styles
 */

/* Container */
.regent-exam-container {
    max-width: 600px;
    margin: 30px auto;
    padding: 0;
}

.regent-exam-form {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.regent-exam-form h3 {
    margin-top: 0;
    margin-bottom: 25px;
    color: #333;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group:last-of-type {
    margin-bottom: 0;
    margin-top: 30px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
    font-size: 14px;
}

/* Input Fields */
.form-group input[type="number"],
.form-group input[type="date"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-group input[type="number"]:focus,
.form-group input[type="date"]:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* Submit Button */
.regent-exam-submit {
    width: 100%;
    padding: 14px 20px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.regent-exam-submit:hover {
    background: #45a049;
}

.regent-exam-submit:active {
    transform: scale(0.98);
}

.regent-exam-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Loading State */
.regent-exam-loading {
    text-align: center;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 4px;
    margin-top: 20px;
}

.regent-exam-loading .spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 15px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.regent-exam-loading p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Results Display */
.regent-exam-results {
    margin-top: 25px;
}

.exam-results-display {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 20px;
}

.exam-results-display h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #4CAF50;
}

/* Results Table */
.exam-results-table {
    width: 100%;
    border-collapse: collapse;
}

.exam-results-table tr {
    border-bottom: 1px solid #e0e0e0;
}

.exam-results-table tr:last-child {
    border-bottom: none;
}

.exam-results-table th,
.exam-results-table td {
    padding: 12px 10px;
    text-align: left;
}

.exam-results-table th {
    font-weight: 600;
    color: #555;
    width: 40%;
    font-size: 14px;
}

.exam-results-table td {
    color: #333;
    font-size: 14px;
}

/* Error Display */
.regent-exam-error {
    margin-top: 20px;
    padding: 15px;
    background: #ffebee;
    border: 1px solid #f44336;
    border-radius: 4px;
    color: #c62828;
}

.regent-exam-error p {
    margin: 0;
    font-size: 14px;
}

/* Success Indicators */
.exam-results-table tr:hover {
    background: rgba(76, 175, 80, 0.05);
}

/* Responsive Design */
@media (max-width: 768px) {
    .regent-exam-container {
        margin: 20px;
    }
    
    .regent-exam-form {
        padding: 20px;
    }
    
    .regent-exam-form h3 {
        font-size: 20px;
    }
    
    .form-group input[type="number"],
    .form-group input[type="date"],
    .regent-exam-submit {
        font-size: 14px;
        padding: 10px 12px;
    }
    
    .exam-results-table th {
        width: 45%;
    }
    
    .exam-results-table th,
    .exam-results-table td {
        padding: 10px 8px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .regent-exam-container {
        margin: 15px;
    }
    
    .regent-exam-form {
        padding: 15px;
    }
    
    .exam-results-display {
        padding: 15px;
    }
    
    .exam-results-table th,
    .exam-results-table td {
        display: block;
        width: 100%;
        padding: 8px 0;
    }
    
    .exam-results-table th {
        font-weight: 600;
        padding-bottom: 4px;
    }
    
    .exam-results-table td {
        padding-bottom: 12px;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .exam-results-table tr:last-child td {
        border-bottom: none;
    }
}

/* Print Styles */
@media print {
    .regent-exam-form form,
    .regent-exam-submit,
    .regent-exam-loading {
        display: none;
    }
    
    .regent-exam-results {
        margin-top: 0;
    }
    
    .exam-results-display {
        border: 2px solid #333;
    }
}
