/* ==========================================
   Course Manager Dashboard Overlay CSS
   Accent Color: CSHL Crimson Red (#7c0815)
   ========================================== */

/* 1. Base Modal Overlay */
.csha-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.csha-modal-content {
    background-color: #1e1e1e;
    color: #f0f0f0;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 420px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid #333;
}

.csha-modal-close {
    position: absolute;
    top: 15px;
    right: 18px;
    font-size: 24px;
    cursor: pointer;
    color: #888;
    transition: color 0.2s;
}
.csha-modal-close:hover {
    color: #fff;
}

.csha-modal-header {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    text-align: center;
}

.csha-modal-subheader {
    font-size: 13px;
    color: #aaa;
    text-align: center;
    margin-bottom: 25px;
}

.csha-input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    background-color: #2b2b2b;
    border: 1px solid #444;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.csha-input:focus {
    border-color: #7c0815;
    outline: none;
}

.csha-btn {
    width: 100%;
    padding: 12px;
    background-color: #7c0815;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.2s;
}
.csha-btn:hover {
    background-color: #9c0c1c;
}
.csha-btn:disabled {
    background-color: #444;
    cursor: not-allowed;
}

.csha-auth-info {
    font-size: 14px;
    color: #88d49e;
    margin-bottom: 15px;
    text-align: center;
}

/* 2. Admin Dashboard Panel Overlay */
.csha-dashboard-panel {
    position: fixed;
    top: 5%;
    left: 5%;
    width: 90%;
    height: 90%;
    background-color: #121212;
    color: #e0e0e0;
    z-index: 9999998;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    border: 1px solid #2a2a2a;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.csha-dashboard-header {
    background-color: #1a1a1a;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #2a2a2a;
}

.csha-dashboard-title-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.csha-dashboard-logo {
    font-weight: 700;
    font-size: 18px;
    color: #fff;
}

.csha-dashboard-user-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.csha-dashboard-close-btn {
    font-size: 28px;
    cursor: pointer;
    color: #888;
    transition: color 0.2s;
}
.csha-dashboard-close-btn:hover {
    color: #fff;
}

/* Nav tabs */
.csha-dashboard-nav {
    background-color: #161616;
    display: flex;
    padding: 0 20px;
    border-bottom: 1px solid #2a2a2a;
}

.csha-nav-tab {
    background: none;
    border: none;
    color: #888;
    padding: 15px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    position: relative;
    transition: color 0.2s;
}
.csha-nav-tab:hover {
    color: #fff;
}
.csha-nav-tab.active {
    color: #fff;
}
.csha-nav-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #7c0815;
}

/* Dashboard Body */
.csha-dashboard-body {
    flex: 1;
    padding: 25px;
    overflow-y: auto;
    background-color: #121212;
}

/* Dropdown styling */
#csha_dashboard_year_select {
    background-color: #2b2b2b;
    color: #fff;
    border: 1px solid #444;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
}

.csha-btn-small {
    padding: 6px 12px;
    background-color: #2a2a2a;
    border: 1px solid #444;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: background-color 0.2s;
}
.csha-btn-small:hover {
    background-color: #3a3a3a;
}

.csha-btn-red-outline {
    padding: 6px 12px;
    background: none;
    border: 1px solid #7c0815;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: background-color 0.2s;
}
.csha-btn-red-outline:hover {
    background-color: #7c0815;
}

.csha-btn-logout {
    padding: 6px 12px;
    background-color: #7c0815;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    transition: background-color 0.2s;
}
.csha-btn-logout:hover {
    background-color: #9c0c1c;
}

.csha-badge-draft {
    background-color: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.4);
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
    font-weight: 600;
}

/* Alert Boxes */
.csha-alert {
    background-color: #1e1b1b;
    border-left: 4px solid #7c0815;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 0 8px 8px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.csha-alert-msg {
    font-size: 14px;
    color: #e0e0e0;
}

/* Table grid view styling */
.csha-grid-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.csha-grid-table th {
    background-color: #1a1a1a;
    color: #aaa;
    font-size: 12px;
    font-weight: 600;
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid #2a2a2a;
}

.csha-grid-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #232323;
    font-size: 13px;
    color: #ccc;
    vertical-align: middle;
}

.csha-grid-table tr:hover {
    background-color: #181818;
}

.csha-profile-pic {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background-color: #2b2b2b;
}

.csha-action-group {
    display: flex;
    gap: 8px;
}

.csha-btn-action {
    background: none;
    border: 1px solid #444;
    color: #ccc;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}
.csha-btn-action:hover {
    border-color: #7c0815;
    color: #fff;
}

.csha-drag-handle {
    cursor: grab;
    color: #555;
    font-size: 16px;
}

/* Roster Autocomplete dropdown suggestions list overlay */
.csha-autocomplete-wrapper {
    position: relative;
    width: 100%;
}

.csha-autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-top: none;
    border-radius: 0 0 8px 8px;
    z-index: 10000;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    margin: 0;
    padding: 0;
    list-style: none;
}

.csha-autocomplete-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #2b2b2b;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #ccc;
}
.csha-autocomplete-item:hover {
    background-color: #7c0815;
    color: #fff;
}

.csha-autocomplete-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.csha-autocomplete-item-new {
    font-weight: 600;
    color: #88d49e;
}


/* ==========================================
   Public Registration Form Custom Styles
   ========================================== */
.csha-reg-container {
    max-width: 800px;
    margin: 30px auto;
    background-color: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #334155;
    border-radius: 6px;
    overflow: hidden;
}

.csha-reg-header {
    background-color: #7c0815;
    color: #fff;
    padding: 20px 25px;
}
.csha-reg-header h4 {
    margin: 0;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 0.5px;
    color: #fff !important;
}

.csha-reg-body {
    padding: 25px;
}

.csha-reg-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -10px;
    margin-left: -10px;
    margin-bottom: 15px;
}

.csha-reg-col-2  { width: 16.6666%; padding: 0 10px; box-sizing: border-box;}
.csha-reg-col-4  { width: 33.3333%; padding: 0 10px; box-sizing: border-box;}
.csha-reg-col-6  { width: 50%; padding: 0 10px; box-sizing: border-box;}
.csha-reg-col-12 { width: 100%; padding: 0 10px; box-sizing: border-box;}

.csha-reg-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #475569;
}

.csha-reg-input {
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    box-sizing: border-box;
    background-color: #fff;
    color: #334155;
}
.csha-reg-input:focus {
    border-color: #7c0815;
    outline: none;
}

.csha-reg-select {
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    box-sizing: border-box;
    background-color: #fff;
    color: #334155;
    height: 38px;
}
.csha-reg-select:focus {
    border-color: #7c0815;
    outline: none;
}
.csha-reg-select:disabled {
    background-color: #f8fafc;
    color: #000000;
    cursor: default;
    border-color: #cbd5e1;
    opacity: 1;
    -webkit-text-fill-color: #000000;
}

.csha-reg-file {
    width: 100%;
    padding: 8px 0;
    font-size: 14px;
}

.csha-reg-section-title {
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 15px;
    font-weight: 700;
    border-bottom: 2px solid #7c0815;
    padding-bottom: 6px;
    color: #7c0815;
}

.csha-reg-btn {
    padding: 10px 24px;
    background-color: #7c0815;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.2s;
}
.csha-reg-btn:hover {
    background-color: #9c0c1c;
}

.csha-reg-feedback {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
    font-size: 14px;
}
.csha-reg-feedback.success {
    background-color: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}
.csha-reg-feedback.error {
    background-color: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

@media (max-width: 768px) {
    .csha-reg-col-2, .csha-reg-col-4, .csha-reg-col-6 {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* Actions Dropdown & Copy Email Styles */
.csha-copy-email-btn {
    transition: color 0.15s ease-in-out;
}
.csha-copy-email-btn:hover {
    color: #0f172a !important;
}
.csha-btn-more {
    transition: background-color 0.15s, color 0.15s;
}
.csha-btn-more:hover {
    background-color: #f1f5f9;
    color: #0f172a !important;
}
.csha-action-dropdown-menu a {
    transition: background-color 0.15s;
}
.csha-action-dropdown-menu a:hover {
    background-color: #f8fafc;
    color: #0f172a;
}

/* ==========================================
   Unified Components (v1.6 Refactor)
   ========================================== */

/* Button Modifiers */
.csha-btn-success { background-color: #2e7d32; border-color: #2e7d32; color: #fff; }
.csha-btn-success:hover { background-color: #1b5e20; border-color: #1b5e20; }
.csha-btn-danger { background-color: #d32f2f; border-color: #d32f2f; color: #fff; }
.csha-btn-danger:hover { background-color: #b71c1c; border-color: #b71c1c; }

/* Unified Data Card */
.csha-data-card {
    background-color: #1a1a1a;
    border-radius: 8px;
    border: 1px solid #2a2a2a;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    overflow: hidden;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}
.csha-card-header {
    background-color: #222;
    padding: 15px 20px;
    border-bottom: 1px solid #333;
    font-weight: 600;
    font-size: 15px;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.csha-card-body {
    padding: 20px;
    color: #ccc;
    font-size: 14px;
}

/* Action Dropdown Menu */
.csha-action-menu-wrapper {
    position: relative;
    display: inline-block;
}
.csha-action-menu-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 5px;
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    z-index: 1000;
    min-width: 140px;
    overflow: hidden;
    display: none;
}
.csha-action-menu-dropdown.show {
    display: block;
}
.csha-action-menu-dropdown button,
.csha-action-menu-dropdown a {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 15px;
    background: none;
    border: none;
    border-bottom: 1px solid #2b2b2b;
    color: #ccc;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
    box-sizing: border-box;
}
.csha-action-menu-dropdown button:last-child,
.csha-action-menu-dropdown a:last-child {
    border-bottom: none;
}
.csha-action-menu-dropdown button:hover,
.csha-action-menu-dropdown a:hover {
    background-color: #7c0815;
    color: #fff;
}

/* Gallery Grid Layout */
.csha-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

/* Unify Tab Top Spacing */
.csha-tab-content {
    padding-top: 20px;
}
.csha-tab-content > :first-child {
    margin-top: 0 !important;
}
