/**
 * Attendance System Styles
 * Displays attendance information for unit members
 */

/* General Styling (matches ORBAT) */
body {
    font-family: 'Arial', Helvetica, sans-serif;
    background-color: #f9f9f9;
    color: #333;
}

/* Attendance Container */
.attendance-container {
    max-width: 1200px;
    margin: 20px auto;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.attendance-container h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #0066a2;
    font-size: 2em;
    border-bottom: 2px solid #0066a2;
    padding-bottom: 10px;
}

/* Filter Controls */
.filter-controls {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.filter-btn {
    background-color: #0066a2;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.filter-btn:hover {
    background-color: #004e7c;
}

.filter-btn.active {
    background-color: #004e7c;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Table Styling */
.table-responsive {
    overflow-x: auto;
}

.attendance-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.attendance-table th {
    background-color: #0066a2;
    color: white;
    padding: 12px 8px;
    text-align: left;
    font-weight: bold;
}

.attendance-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #e0e0e0;
}

.attendance-table tr:nth-child(even) {
    background-color: #f5f9fc;
}

.attendance-table tr:hover {
    background-color: #e1f5fe;
}

/* Section Divider */
.section-divider td {
    background-color: #e1f5fe;
    font-weight: bold;
    color: #0066a2;
    padding: 10px 8px;
}

/* Status Indicators */
.promotion-ready {
    background-color: rgba(46, 204, 113, 0.1);
}

.attendance-warning {
    background-color: rgba(241, 196, 15, 0.1);
}

.attendance-danger {
    background-color: rgba(231, 76, 60, 0.1);
}

/* Low Attendance Indicator */
.low-attendance {
    color: #e74c3c;
    font-weight: bold;
}

/* Crown Icon for Promotion Eligible */
.promotion-icon {
    display: inline-block;
    color: #f1c40f;
    margin-left: 5px;
}

/* Responsive Design */
@media (max-width: 992px) {
    .attendance-container {
        margin: 10px;
        padding: 15px;
    }
    
    .filter-controls {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .attendance-table thead {
        display: none;
    }
    
    .attendance-table, 
    .attendance-table tbody, 
    .attendance-table tr, 
    .attendance-table td {
        display: block;
        width: 100%;
    }
    
    .attendance-table tr {
        margin-bottom: 15px;
        border: 1px solid #ddd;
    }
    
    .attendance-table td {
        text-align: right;
        padding-left: 50%;
        position: relative;
        border-bottom: 1px solid #eee;
    }
    
    .attendance-table td:before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
    }
    
    .section-divider td {
        text-align: center;
        padding-left: 0;
    }
    
    .section-divider td:before {
        display: none;
    }
} 