/* static/css/tournament_common.css */

/* Shared Base Styles */
.round-container {
    background: #fdfdfd;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    border-left: 6px solid #0d6efd;
}

.match-box {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: transform 0.2s;
}

.match-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.autocomplete-list {
    position: absolute;
    z-index: 1000;
    background: white;
    border: 1px solid #ccc;
    width: 95%;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-radius: 4px;
}

.suggestion-item {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.suggestion-item:hover {
    background: #f8f9fa;
    color: #0d6efd;
}

.match-id-badge {
    background: #343a40;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: monospace;
}

.rr-table {
    font-size: 0.85rem;
    background: white;
}

.progress-chk {
    transform: scale(1.2);
    cursor: pointer;
}

.category-pill-custom.nav-link.active {
    background-color: transparent !important;
    color: #212529 !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.category-pill-custom.nav-link:not(.active) {
    font-weight: 400 !important;
}

/* Bracket Styles */
.bracket-wrapper {
    display: flex;
    gap: 40px;
    overflow-x: auto;
    padding-bottom: 15px;
    align-items: center;
}

.bracket-round {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    height: 100%;
    min-height: 400px;
}

.bracket-match {
    display: flex;
    flex-direction: column;
    background: #1e1e24;
    border: 1px solid #3a3a42;
    border-radius: 6px;
    width: 240px;
    margin: 15px 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.bracket-slot {
    padding: 8px 12px;
    font-size: 0.85rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bracket-slot:first-child {
    border-bottom: 1px solid #3a3a42;
}

.bracket-winner {
    background-color: #14281d !important;
    color: #ffc107 !important;
    font-weight: bold;
}

.bracket-placeholder {
    color: #6c757d;
    font-style: italic;
    font-size: 0.8rem;
    background-color: #16161a;
}

.bracket-label-tag {
    font-size: 0.7rem;
    background: #2b2b36;
    color: #a1a1aa;
    padding: 2px 6px;
    border-radius: 4px;
    float: right;
}

.bracket-match-status {
    font-size: 0.6rem;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 5px;
}

.bracket-seq-num {
    color: #ff6b6b !important;
    font-weight: bold;
}

/* Grid/Scheduler Styles */
.cell-default {
    background-color: #ffffff;
}

.cell-completed {
    background-color: #d3d3d3 !important;
    color: #6c757d !important;
    opacity: 0.8;
    border: 1px solid #b0b0b0;
}

.cell-time-missing {
    background-color: #e9ecef;
    color: #6c757d;
    font-style: italic;
}

.readonly-cross {
    color: #dc3545;
    font-size: 1.1rem;
    line-height: 1;
    opacity: 0.6;
    cursor: default;
}

/* Banner & Rules */
.banner-container {
    width: 100%;
    max-width: 100%;
    margin-bottom: 20px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.banner-container img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

.rules-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 5px solid #dc3545;
    border-radius: 8px;
    padding: 18px 24px;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.rules-container h5 {
    color: #dc3545;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rules-container ul {
    margin-bottom: 0;
    padding-left: 20px;
}

.rules-container ul li {
    margin-bottom: 6px;
    color: #212529;
    line-height: 1.6;
}

.rules-container ul li:last-child {
    margin-bottom: 0;
}

.rules-container .rule-sub {
    padding-left: 20px;
    list-style-type: lower-alpha;
    margin-top: 4px;
}

.rules-container .rule-sub li {
    color: #495057;
    font-size: 0.95rem;
}

/* Admin Auth Overlay */
#admin-auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: Arial, sans-serif;
}

#admin-auth-overlay.hidden {
    display: none !important;
}

.auth-card {
    text-align: center;
    padding: 30px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-width: 400px;
    width: 90%;
    background: #fff;
}

.auth-card h2 {
    color: #333;
    margin-top: 0;
    font-size: 22px;
    margin-bottom: 15px;
}

.auth-form-group {
    margin-bottom: 20px;
    text-align: left;
}

.auth-form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #495057;
}

.auth-input {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    box-sizing: border-box;
}

.auth-input:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

.auth-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 24px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s;
}

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

.error-text {
    color: #dc3545;
    font-size: 14px;
    margin-top: 10px;
    display: none;
}

/* Category Tab Styles - Enhanced */
/* Category Tab Styles - Enhanced */
.category-pill-custom {
    transition: all 0.3s ease !important;
    border-radius: 6px 6px 4px 4px !important; /* Rounded top corners only */
    padding: 10px 18px !important;
    font-size: 0.9rem !important;
    background-color: transparent !important;
    border: 1px solid #dee2e6 !important;
}

.category-pill-custom:hover {
    background-color: rgba(0,0,0,0.03) !important;
    transform: translateY(-1px);
}

.category-pill-custom.nav-link.active {
    background-color: #ffffff !important;
    color: #212529 !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05) !important;
    border-bottom: 1px solid transparent !important; /* Keeps it looking integrated */
}

.category-pill-custom.nav-link:not(.active) {
    font-weight: 500 !important;
    opacity: 0.8;
}

/* Category content area - subtle color accent */
.tab-pane {
    border-top: 3px solid transparent;
    padding-top: 20px;
    transition: border-color 0.3s ease;
}

.tab-pane.active {
    border-top-color: var(--cat-color, #6c757d);
}