/* Coach Team Management Styles */

/* Year Selector */
.year-selector-container {
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.year-selector-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.year-selector {
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 200px;
}

.btn-add-season {
    margin-left: 1rem;
    padding: 0.75rem 1.5rem;
    background: #178a4f;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.btn-add-season:hover {
    background: #218838;
}

/* Tabs */
.team-management-tabs {
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 2rem;
    display: flex;
    gap: 0;
}

.tab-btn {
    padding: 1rem 2rem;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    border-bottom: none;
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
    display: inline-block;
}

.tab-btn.active {
    border-bottom: 2px solid var(--primary-blue, #007bff);
    font-weight: 500;
    color: var(--primary-blue, #007bff);
}

.tab-btn:hover:not(.active) {
    color: var(--primary-blue, #007bff);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Tab Headers */
.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

.tab-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.import-help-text {
    color: #667085;
    font-size: 0.9rem;
    margin: -0.4rem 0 1rem;
}

.visually-hidden-file {
    height: 1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    width: 1px;
    pointer-events: none;
}

.btn-primary {
    padding: 0.65rem 1rem;
    background: var(--primary-blue, #007bff);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary:hover {
    background: #0056b3;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content h2 {
    margin-top: 0;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-help-text {
    color: #667085;
    font-size: 0.88rem;
    margin: -0.2rem 0 0.5rem;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.btn-secondary {
    padding: 0.65rem 1rem;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #5a6268;
}

.game-site-options {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.game-site-options .checkbox-label {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    gap: 0.45rem;
    padding: 0.65rem 0.85rem;
}

.neutral-location-group {
    margin-top: -0.25rem;
}

.btn-inline-form {
    margin-top: 0.6rem;
}

.coach-create-opponent-panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 1rem;
    padding: 1rem;
}

.coach-create-opponent-panel h3 {
    color: #111827;
    font-size: 1rem;
    margin: 0 0 0.35rem;
}

.coach-create-opponent-section {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.85rem;
}

.coach-create-opponent-divider {
    align-items: center;
    color: #6b7280;
    display: flex;
    font-size: 0.8rem;
    font-weight: 700;
    gap: 0.7rem;
    letter-spacing: 0;
    margin: 0.85rem 0;
    text-transform: uppercase;
}

.coach-create-opponent-divider::before,
.coach-create-opponent-divider::after {
    background: #e5e7eb;
    content: "";
    flex: 1;
    height: 1px;
}

.selected-school-help {
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    color: #166534;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0.6rem 0 0;
    padding: 0.55rem 0.65rem;
}

/* Search Results */
.opponent-team-search-group,
#editOpponentGroup,
.new-opponent-school-search-group {
    position: relative;
}

.search-results {
    margin-top: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: none;
    background: white;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
    left: 0;
    position: absolute;
    right: 0;
    top: calc(100% - 0.15rem);
    z-index: 1200;
}

.search-results.show {
    display: block;
}

.search-result-item {
    padding: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.search-result-item:hover {
    background: #f0f0f0;
}

/* Tables */
.data-table-wrapper {
    overflow-x: auto;
    margin-top: 1rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.data-table thead {
    background: #f8fafc;
}

.data-table th {
    padding: 0.65rem 0.75rem;
    text-align: left;
    border-bottom: 2px solid #ddd;
}

.data-table td {
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid #eef2f7;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Buttons in Tables */
.btn-action {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 700;
    justify-content: center;
    line-height: 1;
    margin: 0.15rem 0.35rem 0.15rem 0;
    min-height: 32px;
    padding: 0.45rem 0.75rem;
    text-decoration: none;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.btn-edit {
    background: #eef6ff;
    border-color: #bfdbfe;
    color: #0b5cab;
}

.btn-edit:hover {
    background: #dbeafe;
    border-color: #93c5fd;
    box-shadow: 0 6px 16px rgba(0, 86, 179, 0.12);
}

.btn-delete {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #b42318;
}

.btn-delete:hover {
    background: #fee4e2;
    border-color: #fda29b;
    box-shadow: 0 6px 16px rgba(180, 35, 24, 0.12);
}

.btn-stats {
    background: var(--primary-blue, #007bff);
    color: white;
}

.btn-stats:hover {
    background: #0056b3;
    box-shadow: 0 6px 16px rgba(0, 86, 179, 0.18);
}

/* Empty States */
.empty-state {
    padding: 2rem;
    text-align: center;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.empty-state p {
    color: #667;
    margin-bottom: 1rem;
}

/* Error States */
.error-state {
    padding: 1.5rem;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
}

.error-state p {
    color: #856404;
    margin: 0;
}

.error-state p:first-child {
    font-weight: 500;
}

.error-state p:not(:first-child) {
    margin-top: 0.5rem;
}

.btn-retry {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: #ffc107;
    color: #000;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-retry:hover {
    background: #e0a800;
}

/* Loading State */
.loading-state {
    padding: 1rem;
    color: #667;
}

/* Checkbox Label */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Back Link */
.back-link {
    text-decoration: none;
    color: #007bff;
    margin-bottom: 1rem;
    display: inline-block;
}

.back-link:hover {
    text-decoration: underline;
}

.badge-live {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: #e53935;
    color: #fff;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    vertical-align: middle;
}

/* Coach Team Manage Styles */

/* Header */
.team-header-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.team-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.team-header-info h1 {
    margin: 0;
}

.team-header-info p {
    margin: 0;
}

/* Year Selector */
.year-selector-container {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
}

/* Loading States */
.loading-state {
    text-align: center;
    padding: 2rem;
    color: #667;
}

.error-state {
    color: #d32f2f;
    padding: 2rem;
}

/* Schedule Table */
.schedule-opponent-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.schedule-opponent-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* Search Results */
.search-result-item {
    padding: 0.75rem;
    color: #667;
    cursor: pointer;
}

.search-result-item:hover {
    background: #f8f9fa;
}

.search-no-results {
    padding: 0.75rem;
    color: #667;
}

.team-access-until {
    margin-top: 0.75rem;
    font-size: 0.95rem;
    color: #444;
    max-width: 36rem;
    line-height: 1.4;
}
