/* Shared styling. Layout, cards, forms and spacing are handled by Bootstrap. */
:root {
    --bs-border-radius: 8px;
    --bs-link-color: #0b5918;
    --bs-link-hover-color: #074310;
    --bs-link-color-rgb: 11, 89, 24;
}
a { color: #0b5918; }
.btn-outline-primary {
    --bs-btn-color: #0b5918;
    --bs-btn-border-color: #0b5918;
    --bs-btn-hover-bg: #0b5918;
    --bs-btn-hover-border-color: #0b5918;
}
.btn-primary {
    --bs-btn-bg: #0b5918;
    --bs-btn-border-color: #0b5918;
    --bs-btn-hover-bg: #074310;
    --bs-btn-hover-border-color: #074310;
}
.app-sidebar { width: 210px; flex-shrink: 0; min-height: 100vh; background: #f4eee4; }
.app-sidebar .nav-link { color: #0b5918; }

/* Tournament bracket css */
.bracket-window { overflow-x: auto; overflow-y: hidden; padding: 8px 0 16px; }
.bracket-track { display: flex; align-items: flex-start; gap: 8px; width: max-content; }
.bracket-round { width: 245px; flex-shrink: 0; background: #eaf2ea; }
.score-input { width: 65px; }
.min-width-0 { min-width: 0; }
.bracket-toolbar { position: sticky; top: 8px; z-index: 10; }
.bracket-toolbar .rounded-circle { width: 44px; height: 44px; }
.edit-only { display: none !important; }
.editing .edit-only { display: inline-block !important; }
.editing .view-only, .editing #editBracket { display: none !important; }
.editing .seat[draggable="true"] { cursor: grab; }

.teams-page {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

.teams-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.teams-card {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 0;
    min-width: 0;
}

@media (max-width: 900px) {
    .teams-grid {
        grid-template-columns: 1fr;
    }
}

.teams-card {
    display: flex;
    align-items: center;
    gap: 16px;
}

.teams-logo {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 8px;
}

.teams-logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #eaf2ea;
    color: #0b5918;
    font-size: 32px;
    font-weight: 600;
}

.teams-card-content {
    min-width: 0;
    overflow-wrap: anywhere;
}

.teams-detail-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
}

.teams-detail-logo {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    object-fit: contain;
    border-radius: 12px;
    background-color: #eaf2ea;
}

.teams-detail-header h2 {
    margin: 0;
}

.teams-section {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    min-width: 0;
}

.teams-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.teams-section .teams-detail-header {
    margin-bottom: 0;
}

@media (max-width: 900px) {
    .teams-detail-grid {
        grid-template-columns: 1fr;
    }
}

.auth-page {
    width: 100%;
    max-width: 460px;
    margin: 12px auto;
    padding: 20px 28px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 10px;
}

.auth-page h1 {
    text-align: center;
    margin-bottom: 16px;
}

.auth-page form label {
    display: inline-block;
    margin: 8px 0 3px;
    font-weight: 500;
}

.auth-page form input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="submit"]) {
    display: block;
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    margin-bottom: 6px;
}

.auth-page form input:focus {
    outline: none;
    border-color: #0b5918;
    box-shadow: 0 0 0 3px rgba(11, 89, 24, 0.12);
}

.auth-page form button[type="submit"],
.auth-page form input[type="submit"] {
    width: 100%;
    padding: 9px 16px;
    margin-top: 8px;
    background-color: #0b5918;
    color: white;
    border: 1px solid #0b5918;
    border-radius: 8px;
    cursor: pointer;
    display: block;
    margin-bottom: 16px;
}

.auth-page form button[type="submit"]:hover,
.auth-page form input[type="submit"]:hover {
    background-color: #074310;
}

.auth-page > p {
    text-align: center;
    margin-top: 16px;
}

@media (max-width: 576px) {
    .auth-page {
        margin: 0 auto;
        padding: 16px;
        border: none;
    }
}


/* Team creation page */

.teams-create-page {
    max-width: 760px;
}

.teams-create-page h1 {
    margin-bottom: 22px;
}

.teams-create-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 28px 30px;
}

.teams-create-description {
    color: #6c757d;
    margin-bottom: 24px;
}

.teams-create-card label {
    display: block;
    font-weight: 600;
    margin-bottom: 7px;
}

.teams-create-card input[type="text"],
.teams-create-card textarea {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font: inherit;
    margin-bottom: 18px;
    box-sizing: border-box;
}

.teams-create-card textarea {
    min-height: 150px;
    resize: vertical;
}

.teams-create-card input:focus,
.teams-create-card textarea:focus {
    outline: none;
    border-color: #0b5918;
    box-shadow: 0 0 0 3px rgba(11, 89, 24, 0.12);
}

.teams-create-card button[type="submit"],
.teams-create-card input[type="submit"] {
    background: #0b5918;
    color: white;
    border: 1px solid #0b5918;
    border-radius: 6px;
    padding: 10px 20px;
    cursor: pointer;
}

.teams-create-card button[type="submit"]:hover,
.teams-create-card input[type="submit"]:hover {
    background: #084312;
}

.teams-create-card a {
    display: inline-block;
    color: #0b5918;
    margin-top: 12px;
}

@media (max-width: 600px) {
    .teams-create-card {
        padding: 20px;
    }
}
