/**
 * 49 Royal Marines Commando Roster
 * Modern, sleek styling
 */

/* Base styles and reset */
:root {
    --primary: #1a2a3a;
    --secondary: #2c3e50;
    --accent: #3498db;
    --text: #2c3e50;
    --light: #ecf0f1;
    --border: #e0e0e0;
    --success: #27ae60;
    --warning: #f39c12;
    --danger: #e74c3c;
    --muted: #7f8c8d;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
    --transition: all 0.2s ease;
}

.roster-container * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: var(--text);
    line-height: 1.6;
}

/* Main container */
.roster-container {
    max-width: 1200px;
    margin: 2rem auto;
    background-color: transparent;
    padding: 0;
}

/* Header styling */
.roster-header {
    background-color: var(--primary);
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
}

.roster-header h1 {
    color: var(--light);
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    position: relative;
}

.roster-header:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, #3498db, #2ecc71, #f1c40f, #e74c3c);
}

/* Filter controls */
.filter-controls {
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--card-shadow);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group input, 
.filter-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    transition: var(--transition);
    background-color: #f9fafc;
}

.filter-group input:focus, 
.filter-group select:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Section headers */
.section-header {
    background-color: #f1f5f9;
    padding: 0.75rem 0;
    margin: 2rem 0 1rem;
    border-radius: 6px;
    font-weight: 700;
    color: var(--secondary);
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
    width: 100% !important;
    max-width: none !important;
}

.section-header:after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
}

.section-header td {
    background-color: transparent !important;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 1rem !important;
    text-align: center !important;
    width: 100% !important;
    display: block !important;
    color: var(--secondary) !important;
    font-weight: 700 !important;
}

/* Color coding for different sections */
.section-command:after { background-color: #e74c3c; }
.section-operations:after { background-color: #3498db; }
.section-logistics:after { background-color: #2ecc71; }
.section-infantry:after { background-color: #f39c12; }
.section-support:after { background-color: #9b59b6; }
.section-training:after { background-color: #1abc9c; }

/* Table styling */
.roster-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background-color: transparent;
    margin-bottom: 2rem;
}

.roster-table th {
    background-color: var(--secondary);
    color: white;
    text-align: left;
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: sticky;
    top: 0;
    z-index: 10;
}

.roster-table th:first-child {
    border-top-left-radius: 8px;
}

.roster-table th:last-child {
    border-top-right-radius: 8px;
}

.roster-table td {
    padding: 1rem 1.5rem;
    background-color: white;
    transition: var(--transition);
}

/* Group styling */
.roster-table tr.group-start td {
    border-top: 2px solid var(--border);
}

.roster-table tr:hover td {
    background-color: #f8fafc;
}

/* Alternating row colors within groups */
.trow1 td {
    background-color: white;
}

.trow2 td {
    background-color: #f9fafc;
}

/* Status styling */
.status-active {
    color: var(--success);
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    background-color: rgba(39, 174, 96, 0.1);
    border-radius: 4px;
    display: inline-block;
}

.status-loa {
    color: var(--warning);
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    background-color: rgba(243, 156, 18, 0.1);
    border-radius: 4px;
    display: inline-block;
}

.status-eloa {
    color: var(--danger);
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    background-color: rgba(231, 76, 60, 0.1);
    border-radius: 4px;
    display: inline-block;
}

.status-retired {
    color: var(--muted);
    padding: 0.35rem 0.75rem;
    background-color: rgba(127, 140, 141, 0.1);
    border-radius: 4px;
    display: inline-block;
}

.status-blacklisted {
    color: #000;
    font-weight: 600;
    text-decoration: line-through;
    padding: 0.35rem 0.75rem;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
    display: inline-block;
}

/* Name styling */
.roster-table td a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.roster-table td a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Rank styling */
.rank-text {
    font-weight: 600;
    color: var(--secondary);
}

/* Admin controls */
.status-form {
    margin: 0;
    padding: 0;
}

.status-form select {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background-color: #fff;
    font-size: 0.875rem;
    color: var(--text);
    width: 100%;
    cursor: pointer;
    transition: var(--transition);
}

.status-form select:hover, 
.status-form select:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Success message */
.success-message {
    background-color: rgba(46, 204, 113, 0.1);
    color: var(--success);
    padding: 1rem 1.5rem;
    margin: 0 0 1.5rem 0;
    border-left: 4px solid var(--success);
    border-radius: 4px;
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
}

.success-message:before {
    content: "✓";
    display: inline-block;
    margin-right: 0.75rem;
    font-weight: bold;
    font-size: 1.125rem;
}

/* Sort indicators */
.sort-indicator {
    display: inline-block;
    margin-left: 0.5rem;
    opacity: 0.5;
    transition: var(--transition);
}

th[data-sort]:hover .sort-indicator {
    opacity: 1;
}

/* Assignment color coding */
.assignment-tag {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    background-color: #f1f5f9;
    color: var(--text);
}

/* Responsive design */
@media (max-width: 992px) {
    .roster-container {
        padding: 0 1rem;
    }
}

@media (max-width: 768px) {
    .roster-table {
        display: block;
        overflow-x: auto;
    }
    
    .filter-row {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .roster-header h1 {
        font-size: 1.5rem;
    }
} 