/* Components - Buttons, modals, forms, and reusable UI elements */

/* Review Section Styles */
.review-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.review-section h4 {
    color: var(--club-primary, #111037);
    margin-bottom: 15px;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.review-item {
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.review-item:last-child {
    border-bottom: none;
}

.review-item strong {
    color: #495057;
    min-width: 120px;
    font-weight: 500;
}

/* Role Selection Styles */
.role-item {
    margin-bottom: 12px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: white;
    transition: all 0.2s ease;
}

.role-item:hover {
    border-color: var(--club-primary, #111037);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.role-checkbox {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    cursor: pointer;
    margin: 0;
}

.role-checkbox input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    margin-right: 12px;
    margin-top: 2px;
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s ease;
}

.role-checkbox input[type="checkbox"]:checked + .checkmark {
    background: var(--club-primary, #111037);
    border-color: var(--club-primary, #111037);
}

.role-checkbox input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 12px;
}

.role-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.role-main {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.role-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    white-space: nowrap;
}

.role-description {
    color: #6c757d;
    font-size: 13px;
    line-height: 1.4;
    flex: 1;
}

.role-level-badge {
    background: var(--club-primary, #111037);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* Search Box */
.search-box {
    position: relative;
    margin-bottom: 25px;
    max-width: 400px;
}

.search-input {
    width: 100%;
    padding: 14px 20px 14px 50px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 14px;
    background: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.search-input:focus {
    outline: none;
    border-color: var(--club-primary, #111037);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

.search-input::placeholder {
    color: #adb5bd;
    font-style: italic;
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 16px;
    pointer-events: none;
    transition: color 0.3s ease;
}

.search-box:focus-within .search-icon {
    color: var(--club-primary, #111037);
}

/* Clear button for search */
.search-clear {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s ease;
    opacity: 0;
    visibility: hidden;
}

.search-box.has-content .search-clear {
    opacity: 1;
    visibility: visible;
}

.search-clear:hover {
    background: #f8f9fa;
    color: #495057;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn i {
    pointer-events: none;
    color: white !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: var(--club-primary, #111037);
    color: white;
}

.btn-primary i {
    color: white !important;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary i {
    color: white !important;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger i {
    color: white !important;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success i {
    color: white !important;
}

.btn-warning {
    background: #FEE66E !important;
    color: #333 !important;
}

.btn-warning i {
    color: #333 !important;
}

.btn-info {
    background: var(--theme-info, #3AB5D6) !important;
    border-color: var(--theme-info, #3AB5D6) !important;
    color: white !important;
}

.btn-info i {
    color: white !important;
}

.btn-small {
    padding: 8px 12px;
    font-size: 11px;
    border-radius: 4px;
    min-width: 80px;
}

.btn-large {
    padding: 15px 30px;
    font-size: 18px;
    font-weight: 600;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fff;
    margin: 5% 10%;
    padding: 20px;
    border-radius: 12px;
    width: -webkit-fill-available;
    max-width: 1200px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    max-height: 90vh;
    overflow-y: auto;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: relative;
    z-index: 10;
    line-height: 1;
}

.close:hover {
    color: #000;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.form-control:focus {
    outline: none;
    border-color: #111037;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

/* Player Selection */
.players-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 5px;
    background: #f8f9fa;
}

.player-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    margin: 4px 0;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.player-option:hover {
    background: #e8f4fd;
    border-color: #111037;
}

.player-option input[type="checkbox"] {
    margin: 0;
    width: auto;
}

.player-name {
    font-weight: 500;
    color: #2c3e50;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    background: #e2e3e5;
    color: #383d41;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-approved {
    background: #d4edda;
    color: #155724;
}

.status-rejected {
    background: #f8d7da;
    color: #721c24;
}

.status-active {
    background: #d1ecf1;
    color: #0c5460;
}

.status-draft {
    background: #fff3cd;
    color: #856404;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.status-registration_open {
    background: #d4edda;
    color: #155724;
    border: 2px solid #28a745;
}

.status-draw_ready {
    background: #fff3cd;
    color: #856404;
}

.status-in_progress {
    background: #cce5ff;
    color: #004085;
}

.status-completed {
    background: #e2e3e5;
    color: #383d41;
}

.status-schedule {
    background: #e2e3e5;
    color: #383d41;
}

/* Format Badges */
.format-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    background: #111037;
    color: white;
    margin-left: 8px;
}

.format-badge.admin {
    background: #e74c3c;
    color: white;
}

.format-badge.league_manager {
    background: #f39c12;
    color: white;
}

.format-badge.player {
    background: #27ae60;
    color: white;
}

.format-badge.national {
    background: #8e44ad;
    color: white;
}

.format-badge.county {
    background: #3498db;
    color: white;
}

.format-badge.club {
    background: #2ecc71;
    color: white;
}

.format-badge.season {
    background: #17a2b8;
    color: white;
}

.format-badge.available {
    background: #27ae60;
    color: white;
}

.format-badge.unavailable {
    background: #e74c3c;
    color: white;
}

/* Wizard Styles */
.wizard-header {
    margin-bottom: 30px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 20px;
}

.wizard-steps {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    position: relative;
}

.wizard-steps::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: #e9ecef;
    z-index: 1;
}

.step {
    background: #e9ecef;
    color: #6c757d;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 500;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    cursor: pointer;
}

.step.active {
    background: #111037;
    color: white;
}

.wizard-step {
    min-height: 400px;
}

.wizard-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
}

/* Rink Configuration Styles */
.rink-config {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.rink-config-item {
    margin-bottom: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.rink-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.rink-header label {
    min-width: 150px;
    margin-bottom: 0;
    font-weight: 500;
}

.rink-header select {
    flex: 1;
    margin-bottom: 0;
}

.rink-woods {
    margin-top: 10px;
    padding: 10px;
    background: #fff3cd;
    border-radius: 6px;
    border: 1px solid #ffeaa7;
}

.rink-woods label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    color: #856404;
    font-weight: 500;
}

.rink-woods select {
    width: 100%;
    padding: 6px;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    background: white;
}

.rink-roles {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
}

.roles-header {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    font-weight: 500;
    margin-bottom: 8px;
}

.roles-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.role-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.role-badge.role-lead {
    background: #28a745;
    color: white;
}

.role-badge.role-two {
    background: #17a2b8;
    color: white;
}

.role-badge.role-three {
    background: #ffc107;
    color: #212529;
}

.role-badge.role-skip {
    background: #dc3545;
    color: white;
}

.format-summary {
    margin-top: 20px;
    padding: 15px;
    background: #e3f2fd;
    border-radius: 8px;
    border: 1px solid #2196f3;
}

.format-summary h4 {
    margin-bottom: 10px;
    color: #1976d2;
}

.format-info {
    color: #0d47a1;
}

.format-info ul {
    margin: 10px 0 0 20px;
}

.format-info li {
    margin-bottom: 5px;
}

/* Table Styles */
.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.table th,
.table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #111037;
}

.table th {
    background: #111037 !important;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.table tbody tr:hover {
    background: #f8f9fa;
}

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

.table-striped tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.table-bordered {
    border: 1px solid #111037;
}

.table-bordered th,
.table-bordered td {
    border: 1px solid #111037;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.league-table {
    margin-bottom: 30px;
}

.league-table h3 {
    margin-bottom: 15px;
    color: var(--club-primary, #111037);
    display: flex;
    align-items: center;
    gap: 10px;
}

.league-table .table th {
    text-align: center;
}

.league-table .table td {
    text-align: center;
}

.league-table .table td:first-child {
    text-align: left;
    font-weight: 500;
}

.position-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    margin-right: 8px;
}

.position-1 {
    background: #ffd700;
    color: #333;
}

.position-2 {
    background: #c0c0c0;
    color: #333;
}

.position-3 {
    background: #cd7f32;
    color: white;
}

.position-badge:not(.position-1):not(.position-2):not(.position-3) {
    background: #6c757d;
    color: white;
}


/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
}

.toast-show {
    opacity: 1;
    transform: translateX(0);
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-close:hover {
    color: #333;
}

.toast-success {
    border-left: 4px solid #10b981;
}

.toast-success .toast-icon {
    color: #10b981;
}

.toast-error {
    border-left: 4px solid #ef4444;
}

.toast-error .toast-icon {
    color: #ef4444;
}

.toast-warning {
    border-left: 4px solid #f59e0b;
}

.toast-warning .toast-icon {
    color: #f59e0b;
}

.toast-info {
    border-left: 4px solid #3b82f6;
}

.toast-info .toast-icon {
    color: #3b82f6;
}

/* Confirm Dialog */
.confirm-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.confirm-dialog {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    animation: confirmSlideIn 0.3s ease;
}

@keyframes confirmSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.confirm-dialog-header {
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.confirm-dialog-header h3 {
    margin: 0;
    font-size: 18px;
    color: #111827;
}

.confirm-dialog-body {
    padding: 20px;
}

.confirm-dialog-body p {
    margin: 0;
    color: #6b7280;
    line-height: 1.6;
}

.confirm-dialog-footer {
    padding: 20px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

@media (max-width: 768px) {
    .toast-container {
        left: 20px;
        right: 20px;
        max-width: none;
    }
    
    .toast {
        transform: translateY(-100px);
    }
    
    .toast-show {
        transform: translateY(0);
    }
}


/* ===== Fixture Management Styles ===== */

/* Shared input */
.mf-input {
    width: 100%;
    padding: 8px 10px;
    border: 1.5px solid #d0d5dd;
    border-radius: 8px;
    font-size: 13px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.mf-input:focus {
    outline: none;
    border-color: #111037;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.12);
}
.mf-input-sm {
    padding: 5px 8px;
    font-size: 12px;
}

/* Container — flex column so list fills remaining space */
.mf-container {
    padding: 4px 0;
    display: flex;
    flex-direction: column;
    max-height: calc(90vh - 60px);
}

/* Header */
.mf-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    padding-bottom: 14px;
    border-bottom: 2px solid #eef0f6;
}
.mf-header h2 {
    margin: 0;
    font-size: 20px;
    color: #1a1a2e;
    font-weight: 700;
}
.mf-header h2 i {
    color: #111037;
    margin-right: 6px;
}
.mf-status {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
}
.mf-status-draft {
    background: #fff3e0;
    color: #e65100;
}
.mf-status-live {
    background: #e8f5e9;
    color: #2e7d32;
}

/* Toolbar */
.mf-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.mf-toolbar-right {
    display: flex;
    gap: 8px;
}

/* Generate panel (inline) */
.mf-generate-panel {
    background: #f0f2ff;
    border: 1.5px solid #d4d9f7;
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 16px;
}
.mf-generate-title {
    font-weight: 600;
    font-size: 14px;
    color: #344054;
    margin-bottom: 14px;
}
.mf-generate-title i {
    color: #111037;
    margin-right: 6px;
}

/* Form rows */
.mf-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}
.mf-form-row-3 {
    grid-template-columns: 1fr 1fr 1fr;
}
.mf-form-field {
    min-width: 0;
}
.mf-form-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #475467;
    margin-bottom: 4px;
}
.mf-form-field label i {
    margin-right: 4px;
    color: #111037;
}
.mf-form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}

/* Day chips */
.mf-day-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.mf-day-chip { cursor: pointer; }
.mf-day-chip input { display: none; }
.mf-day-chip span {
    display: inline-block;
    padding: 5px 12px;
    border: 1.5px solid #d0d5dd;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    color: #495057;
    transition: all 0.2s;
    user-select: none;
}
.mf-day-chip input:checked + span {
    background: #111037;
    color: white;
    border-color: #111037;
}
.mf-day-chip span:hover {
    border-color: #111037;
}

/* Venue row */
.mf-venue-row {
    display: flex;
    gap: 6px;
}
.mf-venue-row input { flex: 1; min-width: 0; }
.mf-venue-btn {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border: 1.5px solid #d0d5dd;
    border-radius: 8px;
    background: white;
    color: #111037;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.mf-venue-btn:hover {
    background: #111037;
    color: white;
    border-color: #111037;
}

/* Add section */
.mf-add-section {
    background: #f8f9fb;
    border: 1.5px solid #e2e5ea;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
}
.mf-add-title {
    font-weight: 600;
    font-size: 13px;
    color: #344054;
    margin-bottom: 0;
}
.mf-add-title i:first-child,
.mf-add-title span > i {
    color: #111037;
    margin-right: 5px;
}
.mf-add-body {
    margin-top: 12px;
}
.mf-add-chevron {
    transition: transform 0.2s;
}
.mf-add-chevron.mf-collapsed {
    transform: rotate(180deg);
}

/* Fixture list */
.mf-list-section {
    margin-bottom: 8px;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.mf-list-title {
    font-weight: 600;
    font-size: 13px;
    color: #344054;
    margin-bottom: 10px;
    flex-shrink: 0;
}
.mf-list-title i {
    color: #111037;
    margin-right: 5px;
}
.mf-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 4px;
}

/* Fixture card — stacked layout */
.mf-card {
    background: white;
    border: 1.5px solid #e9ecef;
    border-radius: 10px;
    padding: 12px 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.mf-card:hover {
    border-color: #c5cad1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.mf-card-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.mf-card-num {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: #eef0f6;
    color: #111037;
    font-weight: 700;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.mf-card-team {
    font-weight: 600;
    font-size: 14px;
    color: #1a1a2e;
}
.mf-card-vs {
    font-size: 10px;
    color: #98a2b3;
    font-weight: 600;
    text-transform: uppercase;
}
.mf-card-delete {
    margin-left: auto;
    border: none;
    background: transparent;
    color: #d0d5dd;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s;
    font-size: 13px;
    flex-shrink: 0;
}
.mf-card-delete:hover {
    background: #fef3f2;
    color: #d92d20;
}
.mf-card-swap {
    border: none;
    background: #eef0f6;
    color: #111037;
    cursor: pointer;
    padding: 3px 6px;
    border-radius: 5px;
    transition: all 0.2s;
    font-size: 11px;
    flex-shrink: 0;
}
.mf-card-swap:hover {
    background: #111037;
    color: white;
}
.mf-team-select {
    max-width: 180px;
    padding: 4px 8px !important;
    font-size: 13px !important;
    font-weight: 600;
    color: #1a1a2e;
    border-width: 1.5px;
}
.mf-result-btn {
    border: none; cursor: pointer; border-radius: 6px; font-size: 12px; font-weight: 600; padding: 4px 10px; transition: all .2s;
}
.mf-result-enter {
    background: #ecfdf3; color: #039855; margin-left: auto;
}
.mf-result-enter:hover { background: #d1fadf; }
.mf-result-edit {
    background: #eff8ff; color: #1570ef; padding: 4px 6px;
}
.mf-result-edit:hover { background: #d1e9ff; }
.mf-card-result {
    margin-left: auto; display: flex; align-items: center; gap: 6px;
}
.mf-result-score {
    font-weight: 700; font-size: 13px; color: #344054; background: #f2f4f7; padding: 2px 10px; border-radius: 6px;
}

/* League Result Entry Modal */
#leagueResultModal { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; }
.lre-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.lre-container { position: relative; background: #fff; border-radius: 12px; width: 420px; max-width: 95vw; box-shadow: 0 12px 40px rgba(0,0,0,.2); overflow: hidden; }
.lre-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; background: var(--club-primary, #1a1a2e); color: #fff; }
.lre-header h3 { margin: 0; font-size: 16px; }
.lre-close { background: rgba(255,255,255,.15); border: none; color: #fff; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 14px; }
.lre-teams { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 20px; background: #f9fafb; border-bottom: 1px solid #e5e7eb; }
.lre-team { font-weight: 700; font-size: 14px; color: #1a1a2e; }
.lre-vs { font-size: 11px; color: #98a2b3; font-weight: 600; }
.lre-mode-toggle { display: flex; gap: 0; margin: 14px 20px 0; border: 1px solid #d0d5dd; border-radius: 8px; overflow: hidden; }
.lre-mode-btn { flex: 1; padding: 8px; border: none; background: #fff; font-size: 13px; font-weight: 600; color: #667085; cursor: pointer; transition: all .2s; }
.lre-mode-btn.active { background: var(--club-primary, #1a1a2e); color: #fff; }
.lre-total-row { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 20px; }
.lre-score-group { text-align: center; }
.lre-score-group label { display: block; font-size: 12px; font-weight: 600; color: #667085; margin-bottom: 6px; }
.lre-score-input { width: 80px; padding: 10px; border: 2px solid #d0d5dd; border-radius: 8px; font-size: 24px; font-weight: 800; text-align: center; }
.lre-score-input:focus { border-color: var(--club-primary, #111037); outline: none; }
.lre-dash { font-size: 20px; font-weight: 700; color: #98a2b3; }
.lre-rink-list { padding: 14px 20px; display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow-y: auto; }
.lre-rink-row { display: flex; align-items: center; gap: 8px; }
.lre-rink-label { font-size: 12px; font-weight: 700; color: #667085; min-width: 52px; }
.lre-rink-home, .lre-rink-away { width: 64px; padding: 7px; border: 2px solid #d0d5dd; border-radius: 6px; font-size: 16px; font-weight: 700; text-align: center; }
.lre-rink-home:focus, .lre-rink-away:focus { border-color: var(--club-primary, #111037); outline: none; }
.lre-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid #e5e7eb; }
.lre-scoring-label { text-align: center; padding: 6px 20px; font-size: 12px; font-weight: 600; color: #667085; background: #f2f4f7; border-bottom: 1px solid #e5e7eb; }
.lre-preview { padding: 0 20px; }
.lre-preview:empty { padding: 0; }
.lre-preview-header { font-size: 11px; font-weight: 700; color: #667085; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; padding-top: 12px; }
.lre-preview-detail { font-size: 12px; color: #475467; line-height: 1.6; }
.lre-preview-result { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 10px 0 12px; font-size: 14px; color: #344054; }
.lre-preview-sep { color: #98a2b3; font-weight: 700; }
.lre-winner { color: #039855; font-weight: 700; }
.lre-preview-team strong { font-size: 16px; }
.mf-card-bottom {
    display: grid;
    grid-template-columns: 150px 115px 1fr;
    gap: 8px;
    align-items: center;
    padding-left: 32px;
}
.mf-card-detail {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    overflow: hidden;
}
.mf-card-detail > i {
    color: #98a2b3;
    font-size: 12px;
    flex-shrink: 0;
}
.mf-card-detail > span {
    font-size: 12px;
    color: #475467;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mf-card-detail .mf-input {
    width: 100%;
    min-width: 0;
}
.mf-card-detail-venue {
    min-width: 0;
    overflow: hidden;
}

/* Tier grouping */
.mf-tier-group {
    margin-bottom: 10px;
}
.mf-tier-label {
    font-size: 11px;
    font-weight: 700;
    color: #111037;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 8px;
    border-bottom: 1.5px solid #eef0f6;
    margin-bottom: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    user-select: none;
    border-radius: 6px;
    transition: background 0.15s;
}
.mf-tier-label:hover {
    background: #f5f6ff;
}
.mf-tier-label i:first-child { margin-right: 2px; }
.mf-tier-count {
    font-weight: 500;
    color: #98a2b3;
    font-size: 11px;
}
.mf-tier-chevron {
    margin-left: auto;
    font-size: 11px;
    color: #98a2b3;
    transition: transform 0.2s;
}
.mf-tier-collapsed .mf-tier-chevron {
    transform: rotate(-90deg);
}
.mf-tier-cards {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.mf-tier-badge {
    font-size: 10px;
    font-weight: 600;
    color: #111037;
    background: #eef0f6;
    padding: 2px 8px;
    border-radius: 10px;
}

/* Empty state */
.mf-empty {
    text-align: center;
    padding: 36px 20px;
    color: #98a2b3;
}
.mf-empty i {
    font-size: 28px;
    margin-bottom: 8px;
    display: block;
}
.mf-empty p {
    margin: 0;
    font-size: 13px;
}

/* Responsive */
@media (max-width: 768px) {
    .mf-form-row,
    .mf-form-row-3 {
        grid-template-columns: 1fr;
    }
    .mf-card-bottom {
        grid-template-columns: 1fr 1fr;
        padding-left: 0;
    }
    .mf-card-detail-venue {
        grid-column: 1 / -1;
    }
    .mf-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .mf-toolbar-right {
        justify-content: flex-end;
    }
}

/* ── Card Action Bar ─────────────────────────────────────────────
   Integrated bottom toolbar for data-item cards (leagues, competitions).
   Replaces absolute-positioned buttons that overlapped content.
   ─────────────────────────────────────────────────────────────── */

/* ── Card Action Bar ─────────────────────────────────────────────
   Integrated bottom toolbar for data-item cards.
   ─────────────────────────────────────────────────────────────── */

.card-with-actions {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.card-with-actions .card-content-area {
    padding: 20px;
    flex: 1;
}

.card-actions-bar {
    display: flex;
    margin: 0;
    padding: 0;
    border-top: 1px solid #dee2e6;
}

.card-actions-bar .btn,
.card-actions-bar .card-action-btn {
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
    border: none;
    border-radius: 0;
    padding: 11px 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: filter 0.15s ease;
    color: white;
    white-space: nowrap;
    border-right: 1px solid rgba(0,0,0,0.08);
    box-shadow: none;
}

.card-actions-bar .btn:last-child,
.card-actions-bar .card-action-btn:last-child {
    border-right: none;
}

.card-actions-bar .btn:hover,
.card-actions-bar .card-action-btn:hover {
    filter: brightness(1.12);
}

.card-actions-bar .btn:active,
.card-actions-bar .card-action-btn:active {
    filter: brightness(0.92);
}

/* Colour variants for card-action-btn */
.card-action-primary   { background: #111037; }
.card-action-success   { background: #28a745; }
.card-action-info      { background: #17a2b8; }
.card-action-warning   { background: #e67e22; }
.card-action-danger    { background: #dc3545; }
.card-action-secondary { background: #6c757d; }

/* Override btn-small sizing inside the bar */
.card-actions-bar .btn-small {
    min-width: 0;
    border-radius: 0;
    box-shadow: none;
}

@media (max-width: 768px) {
    .card-actions-bar {
        flex-wrap: wrap;
    }
    .card-actions-bar .btn,
    .card-actions-bar .card-action-btn {
        flex: 1 1 auto;
        min-width: 45%;
        padding: 12px 8px;
        font-size: 12px;
        border-bottom: 1px solid rgba(0,0,0,0.06);
    }
}

/* Poll response confirmation animation */
@keyframes pollResponseFlash {
    0% { opacity: 1; transform: scaleY(1); }
    30% { opacity: 1; transform: scaleY(1); }
    100% { opacity: 0; transform: scaleY(0); max-height: 0; padding: 0; margin: 0; overflow: hidden; }
}
.poll-response-confirmed {
    animation: pollResponseFlash 0.8s ease-out forwards;
    border-left-width: 6px !important;
    position: relative;
    overflow: hidden;
}
.poll-response-confirmed::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    opacity: 0.12;
    pointer-events: none;
}
.poll-response-confirmed.poll-available { border-left-color: #28a745 !important; }
.poll-response-confirmed.poll-available::after { background: #28a745; }
.poll-response-confirmed.poll-unavailable { border-left-color: #dc3545 !important; }
.poll-response-confirmed.poll-unavailable::after { background: #dc3545; }

.poll-response-banner {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 16px; border-radius: 8px; font-weight: 700; font-size: 14px;
    color: white; margin-bottom: 4px; animation: pollBannerIn 0.3s ease-out;
}
.poll-response-banner.available { background: #28a745; }
.poll-response-banner.unavailable { background: #dc3545; }
@keyframes pollBannerIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
