/* ===============================================
   HOME PAGE STYLES
   =============================================== */

/* Sidebar i fixtures layout */
.container {
    margin: 0 auto;
    display: flex;
    max-width: 1280px;
    gap: 10px;
    padding-top: 71px;
}

.fixtures {
    flex: 2.5;

    .fixture-actions {
        display: flex;
        background-color: #fff;
        padding: 19px;
        margin-bottom: 1rem;
        border-radius: 6px;
        justify-content: center;
        border: 1px solid rgba(225, 225, 225, 1);

        .fixture-select {
            flex: 1;
        }
    }
}

.sidebar {
    flex: 1;
}

button.league-title {
    width: 100%;
}

/* Fixtures list styling */
.fixtures-list {
    display: block;
    margin-bottom: 10px;

    .fixtures-list__item {
        height: 40px;
        display: block;
        color: black;
        text-decoration: none;
        font-size: 12px;
        width: 100%;
        line-height: 16px;
        background-color: #fff;
    }

    .fixtures-list__item:hover {
        background-color: rgb(240, 240, 240);
    }

    .fixtures-list__item:last-child {
        border-radius: 0px 0px 6px 6px;
    }

    .all-leagues {
        width: 100%;
        height: 40px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-left: 0.5rem;
        font-size: 13px;
        font-weight: 600;
        color: black;
        cursor: pointer;

        button {
            width: 100%;
        }
    }

    button {
        border: none;
        background: transparent;
        width: 100%;
        font-family: inherit;

        .fixtures-list__item-content {
            display: grid;
            grid-template-columns: 45px 1fr 35px;
            width: 100%;
            color: black;
            text-decoration: none;
            padding-top: 5px;
        }

        .fixtures-list__item-content_match {
            display: grid;
            grid-template-columns: 65px 1fr 65px;
            width: 100%;
            color: rgb(255, 255, 255);
            text-decoration: none;
            padding: 0.5rem 0px;
        }

        .fixture-time {
            text-align: center;
            display: flex;
            align-items: center;
            padding-left: 0.5rem;
            font-size: 12px;
            font-weight: 600;
        }

        .fixture-teams {
            display: flex;
            justify-content: center;
            align-items: center;
            width: 100%;
            font-size: 12px;
            min-width: 0;
        }

        .fixture-score {
            width: 54px;
            height: 26px;
            border-radius: 3px;
            text-align: center;
            font-weight: bold;
            display: flex;
            align-items: center;
            justify-content: center;
            background-color: rgb(230, 230, 230);
            margin: 0px 8px;
            flex: 0 0 45px;
        }

        .live {
            color: orange;
            font-weight: 600;
        }

        .fixture-home-team {
            width: 250px;
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 10px;
            font-size: 12px;
            font-weight: 600;
            min-width: 0;
        }

        .fixture-home-team .style__StyledTeam-jbasLh {
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            text-align: right;
            width: 100%;
        }

        .fixture-away-team {
            width: 250px;
            display: flex;
            align-items: center;
            justify-content: flex-start;
            gap: 10px;
            font-size: 12px;
            font-weight: 600;
            min-width: 0;
        }

        .fixture-away-team .style__StyledTeam-jbasLh {
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            text-align: left;
            width: 100%;
        }

        @media (max-width: 700px) {
            .fixture-home-team {
                width: 150px;
                gap: 5px;
                min-width: 0;
            }
            .fixture-away-team {
                width: 150px;
                gap: 5px;
                min-width: 0;
            }
        }
        @media (max-width: 580px) {
            .fixture-home-team {
                width: 100px;
                gap: 5px;
                min-width: 0;
            }
            .fixture-away-team {
                width: 100px;
                gap: 5px;
                min-width: 0;
            }
        }
    }
}

/* Date selector */
.date-selector {
    flex: 1;
}

.date-form {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 0;
}

.date-selector label {
    color: white;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
}

.date-form input[type="hidden"],
.date-selector input[type="hidden"],
.date-form input.flatpickr-input {
    display: none !important;
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.date-selector input[type="text"] {
    padding: 0.5rem;
    border: 2px solid #006064;
    border-left: none;
    border-right: none;
    font-size: 12px;
    font-weight: 700;
    min-width: 150px;
    color: black;
    text-align: center;
    height: 40px;
}

.date-display {
    padding: 0.5rem;
    border: 2px solid #006064;
    border-left: none;
    border-right: none;
    font-size: 12px;
    font-weight: 700;
    min-width: 150px;
    color: black;
    text-align: center;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    text-transform: capitalize;
    cursor: pointer;
    transition: background-color 0.2s ease;
    user-select: none;
}

.date-display:hover {
    background-color: #f5f5f5;
}

.date-selector input:foxus {
    outline: none !important;
    border: 1px solid #twój-kolor !important;
    box-shadow: none !important;
}

.date-nav-btn {
    padding: 0.5rem 0.75rem;
    border: 2px solid #006064;
    border-radius: 6px;
    color: black;
    text-align: center;
    font-weight: 600;
    height: 40px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    min-width: 40px;
    height: 40px;
}

.date-nav-btn-left {
    padding: 0.5rem 0.75rem;
    color: black;
    border: 2px solid #006064;
    border-right: none;
    border-radius: 6px 0 0 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    min-width: 40px;
    height: 40px;
}

.date-nav-btn-right {
    padding: 0.5rem 0.75rem;
    border: 2px solid #006064;
    border-left: none;
    color: black;
    border-radius: 0 6px 6px 0;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    min-width: 40px;
    height: 40px;
}

.date-nav-btn:hover {
    background-color: #004d4d;
}

.date-nav-btn:disabled {
    background-color: #666;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Moderator controls moved to match detail page */

/* Favorites section styling */
.favorites-section {
    margin-bottom: 1rem;
}

/* Favorite leagues section */
.favorite-leagues-section {
    margin-bottom: 1rem;
}

.favorite-leagues-list {
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: #fff;
    border-radius: 6px;
    border: 1px solid rgba(225, 225, 225, 1);
    margin-bottom: 1rem;
}

.favorite-leagues-list .league-item {
    border-bottom: 1px solid rgba(225, 225, 225, 0.5);
}

.favorite-leagues-list .league-item:last-child {
    border-bottom: 1px solid rgba(225, 225, 225, 1);
    border-radius: 0px 0px 6px 6px;
}

.favorite-leagues-list .league-link {
    padding: 0.75rem 1rem;
}

.favorite-leagues-list .no-favorites {
    padding: 1rem;
    text-align: center;
    color: #666;
    font-size: 12px;
}

.favorite-leagues-list .loading {
    padding: 1rem;
    text-align: center;
    color: #666;
    font-size: 12px;
}

.favorite-star {
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 5px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    fill: #000;
}

.favorite-star:hover {
    background-color: rgba(230, 230, 230, 1);
}

.favorite-star.favorited .star-icon {
    fill: #FFD700;
    stroke: #FFD700;
}

.favorite-star .star-icon {
    stroke: #000;
}

.star-icon {
    width: 20px;
    height: 20px;
    stroke: rgba(255, 255, 255, 0.6);
    fill: none;
    transition: all 0.3s ease;
}

/* League groups (collapsible) */
.league-group {
    border: 1px solid rgba(225, 225, 225, 1);
    border-bottom: none;
}

.league-group:last-child {
    border: 1px solid rgba(225, 225, 225, 1);
}

.league-group__header {
    width: 100%;
    height: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    font-size: 13px;
    font-weight: 600;
    color: black;
    background-color: #fff;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-family: inherit;
    text-decoration: none;
}

.league-group__header:hover,
.league-group__header.active {
    background-color: rgb(240, 240, 240);
}

.league-group__arrow {
    transition: transform 0.3s ease;
}

.league-group__header.expanded .league-group__arrow {
    transform: rotate(180deg);
}

.league-group__content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-bottom: 0;
}

.league-group__content.expanded {
    max-height: 1000px;
}

.league-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    color: black;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    background-color: #fff;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    height: 40px;
}

.league-link:hover,
.league-link.active {
    background-color: rgb(240, 240, 240);
}

.league-link-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.league-favorite-star {
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 3px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 8px;
}

.league-favorite-star:hover {
    background-color: rgba(230, 230, 230, 0.5);
}

.league-favorite-star.favorited .star-icon {
    fill: #FFD700;
    stroke: #FFD700;
}

.league-favorite-star .star-icon {
    width: 16px;
    height: 16px;
    stroke: #666;
    fill: none;
    transition: all 0.3s ease;
}

/* Sub-league groups */
.sub-league-group {
    border-top: 1px solid rgba(225, 225, 225, 0.5);
}

.sub-league-group__header {
    width: 100%;
    height: 36px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem 0 1.5rem;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    background-color: #f9f9f9;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-family: inherit;
    text-decoration: none;
}

.sub-league-group__header:hover,
.sub-league-group__header.active {
    background-color: rgb(230, 230, 230);
}

.sub-league-group__arrow {
    transition: transform 0.3s ease;
}

.sub-league-group__header.expanded .sub-league-group__arrow {
    transform: rotate(180deg);
}

.sub-league-group__content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    list-style: none;
    margin: 0;
    padding: 0;
}

.sub-league-group__content.expanded {
    max-height: 2000px;
}

.league-item {
    list-style: none;
}

/* YouTube Videos */
.youtube-videos {
    background-color: #fff;
    border-radius: 0 0 6px 6px;
    border: 1px solid rgba(225, 225, 225, 1);
}

.youtube-videos .loading,
.youtube-videos .error,
.youtube-videos .no-videos {
    padding: 1rem;
    text-align: center;
    color: #666;
    font-size: 12px;
}

.youtube-video-item {
    height: auto !important;
    min-height: 80px;
}

.youtube-video-link {
    display: flex;
    gap: 10px;
    padding: 10px;
    color: black;
    text-decoration: none;
    transition: background-color 0.3s ease;
    height: 100%;
}

.youtube-video-link:hover {
    background-color: rgb(240, 240, 240);
}

.youtube-thumbnail {
    width: 120px;
    height: 68px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.youtube-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 0;
}

.youtube-title {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

.youtube-date {
    font-size: 11px;
    color: #666;
}

/* Mobile bottom navigation bar */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #fff;
    border-top: 1px solid #e1e1e1;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 10px 0;
}

.mobile-bottom-nav__items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

.mobile-bottom-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: #666;
    padding: 5px 15px;
    transition: color 0.3s ease;
}

.mobile-bottom-nav__item:hover,
.mobile-bottom-nav__item.active {
    color: #006064;
}

.mobile-bottom-nav__icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.mobile-bottom-nav__label {
    font-size: 12px;
    font-weight: 600;
}

/* Mobile responsive */
@media (max-width: 991px) {
    .container {
        padding-bottom: 70px; /* Add padding for fixed bottom nav */
    }

    .container .fixture-actions {
        flex-direction: column;
    }

    .sidebar {
        display: none;
    }

    .fixtures {
        padding-left: 10px;
        padding-right: 10px;
    }

    .mobile-bottom-nav {
        display: block;
    }
}