/* 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, #667eea);
    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, #667eea);
    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, #667eea);
    border-color: var(--club-primary, #667eea);
}

.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, #667eea);
    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, #667eea);
    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, #667eea);
}

/* 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;
}

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

.btn-primary {
    background: linear-gradient(45deg, var(--club-primary, #667eea), var(--club-secondary, #764ba2));
    color: white;
}

.btn-primary i {
    color: white;
}

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

.btn-secondary i {
    color: white;
}

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

.btn-danger i {
    color: white;
}

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

.btn-success i {
    color: white;
}

.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;
}

.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: #667eea;
}

.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: 10px;
    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: #667eea;
}

.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;
}

.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-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: #667eea;
    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: #667eea;
    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, #667eea);
    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;
}