/**
 * OFC Student Attendance OTP Plugin Styles
 */

/* OTP Container */
.ofc-sao-otp-container {
    max-width: 500px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ofc-sao-otp-container h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 24px;
}

.ofc-sao-otp-container > p {
    margin-bottom: 25px;
    color: #666;
}

/* Messages */
#ofc-sao-otp-messages {
    margin-bottom: 20px;
}

.ofc-sao-error,
.ofc-sao-success {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.ofc-sao-error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.ofc-sao-success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

/* Method Selection */
#ofc-sao-method-selection {
    text-align: center;
}

#ofc-sao-method-selection > p {
    margin-bottom: 20px;
    font-weight: 500;
    color: #555;
}

.ofc-sao-method-btn {
    display: inline-block;
    margin: 10px;
    padding: 15px 30px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease;
}

.ofc-sao-method-btn:hover:not(:disabled) {
    background: #005a87;
}

.ofc-sao-method-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.ofc-sao-method-btn .dashicons {
    margin-right: 8px;
    vertical-align: middle;
}

/* Code Input */
#ofc-sao-code-input {
    text-align: center;
}

#ofc-sao-code-input > p {
    margin-bottom: 20px;
    font-weight: 500;
    color: #555;
}

#ofc-sao-otp-code {
    width: 100%;
    max-width: 200px;
    padding: 15px;
    font-size: 24px;
    text-align: center;
    letter-spacing: 8px;
    border: 2px solid #ddd;
    border-radius: 5px;
    margin-bottom: 20px;
    font-family: monospace;
}

#ofc-sao-otp-code:focus {
    outline: none;
    border-color: #0073aa;
}

#ofc-sao-verify-btn,
#ofc-sao-back-btn {
    padding: 12px 30px;
    margin: 5px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease;
}

#ofc-sao-verify-btn {
    background: #0073aa;
    color: #fff;
}

#ofc-sao-verify-btn:hover:not(:disabled) {
    background: #005a87;
}

#ofc-sao-verify-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

#ofc-sao-back-btn {
    background: #f1f1f1;
    color: #555;
}

#ofc-sao-back-btn:hover {
    background: #e1e1e1;
}

/* Login Message */
.ofc-sao-login-message {
    max-width: 500px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-align: center;
}

.ofc-sao-login-message a {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.ofc-sao-login-message a:hover {
    background: #005a87;
}

/* Attendance Container */
.attendance-container {
    font-family: Arial, sans-serif;
    margin: 20px auto;
    max-width: 100%;
    padding: 0 20px;
}

.course-section {
    margin-bottom: 40px;
    border-bottom: 2px solid #eee;
    padding-bottom: 20px;
    display: block;
    min-width: min(100%, max-content);
    max-width: 100%;
    overflow-x: auto;
}

.course-section:last-child {
    border-bottom: none;
}

.attendance-table {
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 14px;
    width: auto;
}

.attendance-table th,
.attendance-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}

.attendance-table th {
    background-color: #f5f5f5;
    font-weight: bold;
    position: relative;
}

.month-header {
    background-color: #e0e0e0;
}

.date-header {
    background-color: #eee;
}

.time-header {
    font-weight: normal;
    min-width: 60px;
}

.status-present {
    background-color: #90EE90;
}

.status-absent {
    background-color: #FFB6C1;
}

.legend {
    margin-top: 20px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border: 1px solid #ddd;
}

.course-info {
    margin-bottom: 20px;
}

.course-info h3 {
    margin: 0 0 10px 0;
}

.course-info p {
    margin: 5px 0;
}

.error-message {
    background-color: #ffebee;
    color: #c62828;
    padding: 16px;
    border-radius: 4px;
    margin: 20px 0;
    border: 1px solid #ffcdd2;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sao-otp-container {
        margin: 20px;
        padding: 20px;
    }
    
    .sao-method-btn {
        display: block;
        width: 100%;
        margin: 10px 0;
    }
    
    .attendance-container {
        padding: 0 10px;
    }
    
    .attendance-table {
        font-size: 12px;
    }
    
    .attendance-table th,
    .attendance-table td {
        padding: 6px 4px;
    }
}