/* Main styles for eBotola - Sports Tournament Management System */

/* General styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Sidebar styles */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    z-index: 100;
    padding: 48px 0 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
}

.sidebar-sticky {
    position: relative;
    top: 0;
    height: calc(100vh - 48px);
    padding-top: .5rem;
    overflow-x: hidden;
    overflow-y: auto;
}

.sidebar .nav-link {
    font-weight: 500;
    color: #333;
    padding: .75rem 1rem;
    border-radius: 0.25rem;
    margin: 0.2rem 0.5rem;
}

.sidebar .nav-link:hover {
    background-color: rgba(0, 123, 255, 0.1);
}

.sidebar .nav-link.active {
    color: #0d6efd;
    background-color: rgba(0, 123, 255, 0.1);
}

.sidebar .nav-link .feather {
    margin-left: 4px;
    color: #727272;
}

.sidebar .nav-link.active .feather {
    color: inherit;
}

.sidebar-heading {
    font-size: .75rem;
    text-transform: uppercase;
}

/* Main content area */
main {
    padding-top: 1.5rem;
}

/* Team logos */
.team-logo-sm {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.team-logo-xs {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.team-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.team-logo-lg {
    width: 100px;
    height: 100px;
    object-fit: contain;
}

/* Tournament cards */
.tournament-card {
    transition: transform 0.3s ease;
    height: 100%;
}

.tournament-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.tournament-card .card-img-top {
    height: 160px;
    object-fit: cover;
}

/* Match cards */
.match-card {
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.match-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.match-score {
    font-size: 1.5rem;
    font-weight: bold;
}

.match-vs {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border-radius: 50%;
    font-weight: bold;
    margin: 0 10px;
}

/* Tournament brackets */
.bracket {
    display: flex;
    flex-direction: row;
}

.bracket .round {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 200px;
    margin-right: 40px;
}

.bracket .round .match {
    margin: 10px 0;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: white;
}

.bracket .connector {
    border-top: 2px solid #ddd;
    border-right: 2px solid #ddd;
    height: 50px;
    width: 20px;
}

/* Standings table */
.standings-table th, .standings-table td {
    vertical-align: middle;
}

.standings-table .team-cell {
    display: flex;
    align-items: center;
}

/* Form elements */
.form-label {
    font-weight: 500;
}

.form-floating > .form-control-plaintext ~ label::after,
.form-floating > .form-control:focus ~ label::after,
.form-floating > .form-control:not(:placeholder-shown) ~ label::after,
.form-floating > .form-select ~ label::after {
    position: absolute;
    inset: 1rem 0.375rem;
    z-index: -1;
    height: 1.5em;
    content: "";
    background-color: var(--bs-body-bg);
    border-radius: var(--bs-border-radius);
}

/* Dashboard stats */
.stat-card {
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Profile page */
.profile-header {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .sidebar {
        top: 5rem;
    }
}

/* Print styles */
@media print {
    .sidebar {
        display: none;
    }
    
    .navbar {
        display: none;
    }
    
    .footer {
        display: none;
    }
    
    .btn-print {
        display: none;
    }
    
    body {
        padding: 0;
        margin: 0;
    }
    
    main {
        padding: 0;
    }
}

/* RTL specific adjustments */
html[dir="rtl"] .sidebar {
    right: 0;
    left: auto;
}

html[dir="rtl"] .sidebar .nav-link .feather {
    margin-right: 0;
    margin-left: 4px;
}

html[dir="rtl"] main {
    margin-right: 240px;
    margin-left: 0;
}

@media (max-width: 767.98px) {
    html[dir="rtl"] main {
        margin-right: 0;
    }
}

/* Custom styles for tournament types */
.sport-football {
    border-left: 4px solid #28a745;
}

.sport-basketball {
    border-left: 4px solid #fd7e14;
}

.sport-handball {
    border-left: 4px solid #6f42c1;
}

.sport-volleyball {
    border-left: 4px solid #20c997;
}

/* Login and registration pages */
.login-page, .register-page {
    display: flex;
    align-items: center;
    padding-top: 40px;
    padding-bottom: 40px;
    background-color: #f5f5f5;
    height: 100vh;
}

.form-signin, .form-register {
    width: 100%;
    max-width: 330px;
    padding: 15px;
    margin: auto;
}

.form-signin .form-floating:focus-within, 
.form-register .form-floating:focus-within {
    z-index: 2;
}

/* Notification badge */
.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(50%, -50%);
}

/* Custom switch for RTL */
.form-switch.form-switch-rtl {
    padding-right: 2.5em;
    padding-left: 0;
}

.form-switch.form-switch-rtl .form-check-input {
    margin-right: -2.5em;
    margin-left: 0;
}
