#scheduler-page .scheduler-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem;
}

#scheduler-page .section-title {
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;

    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-on-background);
    letter-spacing: 0.5px;
}

#scheduler-page .empty-state {
    text-align: center;
    padding: 3rem 1rem;

    background: var(--background-card);
    border: 1px solid var(--primary);
    border-radius: 10px;

    margin-top: 2rem;
}

#scheduler-page .empty-state h2 {
    margin-bottom: 0.5rem;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-on-background);
}

#scheduler-page .empty-state p {
    color: var(--text-on-background-secondary);
    font-size: 1rem;
}

#scheduler-page .tournament-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#scheduler-page .tournament-row {
    display: flex;
    justify-content: space-between;
    align-items: center;

    background: var(--background-card);
    border: 1px solid var(--primary);
    border-left-width: 6px;
    border-radius: 8px;

    padding: 1rem 1.25rem;
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

#scheduler-page .tournament-row:hover {
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    transform: translateY(-1px);
    cursor: pointer;
}

#scheduler-page .status-past {
    border-left-color: #777;
}

#scheduler-page .status-current {
    border-left-color: #2ecc71;
}

#scheduler-page .status-future {
    border-left-color: #3498db;
}

#scheduler-page .tournament-row-left {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

#scheduler-page .tournament-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-on-background);
}

#scheduler-page .tournament-dates {
    font-size: 0.9rem;
    color: var(--text-on-background-secondary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

#scheduler-page .separator {
    opacity: 0.6;
}

#scheduler-page .tournament-row-right {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-on-background);
    display: flex;
    align-items: center;
    flex-direction: row;
    gap: 1.5rem;
}

#scheduler-page .create-tournament-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;

    background: var(--primary-gradient);
    color: var(--text-on-primary-dark);

    padding: 1rem 1.5rem;
    border: none;
    border-radius: 50px;

    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 999;
}

#scheduler-page .create-tournament-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

#scheduler-page .field-label {
    margin: 1rem 0 0;
    font-weight: 600;
    color: var(--text-on-background);
}

#scheduler-page .field-input,
#scheduler-page .field-textarea {
    max-width: 95%;
    resize: vertical;
    box-sizing: border-box;
    padding: 0.6rem 0.75rem;

    background: var(--background);
    color: var(--text-on-background);

    border: 1px solid var(--primary);
    border-radius: 6px;

    font-size: 1rem;
    line-height: 1.4;

    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#scheduler-page .field-textarea {
    min-height: 120px;
    resize: vertical;
}

#scheduler-page .field-input:focus,
#scheduler-page .field-textarea:focus {
    outline: none;
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.25);
}

/* Date picker styling */
#scheduler-page input[type="date"] {
    width: 100%;
    box-sizing: border-box;
    padding: 0.6rem 0.75rem;

    background: var(--background);
    color: var(--text-on-background);

    border: 1px solid var(--primary);
    border-radius: 6px;

    font-size: 1rem;
    line-height: 1.4;

    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#scheduler-page input[type="date"]:focus {
    outline: none;
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.25);
}

/* Style the date picker calendar icon */
#scheduler-page input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1) brightness(0.8);
    cursor: pointer;
}

/* ---------- SELECT2 ---------- */

.select2-container {
    width: 95% !important;
}

/* Main control */
.select2-container--default .select2-selection--multiple,
.select2-container--default .select2-selection--single {
    background: rgba(26, 26, 26, 0.92);
    border: 1px solid var(--primary);
    border-radius: 6px;
    color: var(--text-on-background);
    min-height: 38px;
}

/* Focus state */
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(255, 140, 0, 0.15);
}

/* Search field */
.select2-container--default .select2-search--inline .select2-search__field {
    color: var(--text-on-background);
}

/* Placeholder */
.select2-container--default .select2-selection__placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Selected tags */
.select2-container--default .select2-selection__choice {
    background: rgba(255, 140, 0, 0.12) !important;
    border: 1px solid rgba(255, 140, 0, 0.4);
    color: var(--primary);
    border-radius: 4px;
    padding: 2px 8px;
    margin-top: 7.5px;
}

/* Tag remove button */
.select2-container--default .select2-selection__choice__remove {
    color: rgba(255, 140, 0, 0.7);
    margin-right: 6px;
}

.select2-container--default .select2-selection__choice__remove:hover {
    color: rgba(255, 140, 0, 1);
}

/* Dropdown */
.select2-dropdown {
    background: rgba(26, 26, 26, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    overflow: hidden;
}

.select2-container--default.select2-container--disabled .select2-selection--multiple {
    background-color: rgba(0, 0, 0, 0);
}

.select2-container--default.select2-container--disabled 
.select2-selection--multiple .select2-selection__choice {
    padding-left: 3px;
    opacity: 0.7;
}

.select2-container--default.select2-container--disabled .select2-selection__clear {
    display: none;
}

/* Search inside dropdown */
.select2-search__field {
    background: transparent;
    color: var(--text-on-background);
    border: 1px solid rgba(255,255,255,0.06);
    margin: auto auto;
}

.select2-selection__clear {
    color: white;
    margin-top: 7.5px;
}

/* Options */
.select2-container--default .select2-results__option {
    background: transparent;
    color: var(--text-on-background);
    padding: 8px 12px;
}

/* Hovered option */
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: rgba(255, 140, 0, 0.15);
    color: var(--text-on-background);
}

/* Selected option */
.select2-container--default .select2-results__option[aria-selected="true"] {
    background: rgba(255, 140, 0, 0.08);
    color: var(--primary);
}

/* Remove hover glow if needed */
.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(255, 140, 0, 0.15);
}


#scheduler-page .time-info {
    margin-top: 0.35rem;
    font-size: 0.85rem;
    color: var(--text-on-background-secondary);
    min-height: 1.2em;
}

#scheduler-page .field-errors {
    margin-top: 0.35rem;
    color: var(--danger);
    font-size: 0.85rem;
}

#scheduler-page .modal-card {
    max-width: 500px;
    width: 90%;
    max-height: 95vh;

    background: var(--background);
    border-radius: 10px;
    padding: 1.5rem;

    box-sizing: border-box;
    overflow-y: auto;
}

/* Responsive adjustments - Generated by AI */
@media (max-width: 900px) {
    #scheduler-page .scheduler-container {
        padding: 0.75rem;
    }

    #scheduler-page .field-input,
    #scheduler-page .field-textarea {
        max-width: 100%;
    }

    #scheduler-page .modal-card {
        width: calc(100% - 1.5rem);
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    #scheduler-page .scheduler-container {
        padding: 0.75rem;
    }

    #scheduler-page .field-input,
    #scheduler-page .field-textarea {
        max-width: 100%;
    }

    #scheduler-page .tournament-row-right {
        gap: 1rem;
        flex-wrap: wrap;
    }

    #scheduler-page .modal-card {
        width: calc(100% - 1rem);
        padding: 1rem;
    }
}

@media (max-width: 600px) {
    #scheduler-page .tournament-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    #scheduler-page .tournament-row-right {
        align-self: flex-end;
    }

    #scheduler-page .create-tournament-btn {
        bottom: 1.2rem;
        right: 1.2rem;
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    #scheduler-page .create-tournament-btn {
        left: 1rem;
        right: 1rem;
        width: auto;
        text-align: center;
    }
}
