/* ========================================
   Symulator Farmy Online - Compact Menu Styles
   REDESIGN - kompaktowe, funkcjonalne menu
   ======================================== */

/* Kompaktowy header - gracze + pogoda */
.compact-menu-header {
    animation: slideInFromTop 0.4s ease-out;
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Widget pogody - kompaktowy */
.weather-compact {
    position: relative;
}

.weather-compact:hover {
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Kompaktowe nagłówki sekcji */
.menu-title {
    margin-top: 0.5rem !important;
    margin-bottom: 0.25rem !important;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.menu-title small {
    letter-spacing: 0.5px;
    font-size: 0.7rem;
}

/* Stylizacja badge'ów w menu */
.navbar-nav .badge {
    margin-left: 0.5rem;
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Badge z alertem (czerwony) */
.navbar-nav .badge.bg-danger {
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 50%, 100% { opacity: 1; }
    25%, 75% { opacity: 0.6; }
}

/* Hover na linkach menu - bardziej kompaktowe */
.navbar-nav .nav-link {
    transition: all 0.15s ease;
    border-radius: 0.25rem;
    margin: 0;
    padding: 0.5rem 1rem;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.08);
    padding-left: 1.1rem;
    transform: translateX(1px);
}

/* Zmniejszone odstępy w podmenu */
.navbar-nav .nav-sm .nav-link {
    padding: 0.35rem 1rem;
    font-size: 0.9rem;
}

/* Kompaktowe collapse menu */
.menu-dropdown {
    padding: 0.25rem 0;
}

/* Ikony w menu - subtelne efekty */
.navbar-nav .nav-link i {
    transition: transform 0.15s ease;
    font-size: 1rem;
}

.navbar-nav .nav-link:hover i {
    transform: scale(1.1);
}

/* Zmniejsz spacing ogólnie */
.navbar-nav {
    padding: 0 0.5rem;
    padding-bottom: 5rem !important; /* Dodatkowy padding na dole aby wszystkie pozycje były widoczne */
    position: relative;
    z-index: 10;
}

.navbar-nav .nav-item {
    margin-bottom: 0;
}

/* Upewnij się że scrollbar ma wystarczającą wysokość */
#scrollbar {
    overflow-y: auto;
    max-height: calc(100vh - 60px); /* 60px na top bar */
    padding-bottom: 2rem;
    position: relative;
    z-index: 10;
}

/* Przycisk zarządzania ulubionymi - prosty tekst */
#manage-favorites {
    transition: all 0.2s ease;
    opacity: 0.9;
    font-weight: 600;
}

#manage-favorites:hover {
    opacity: 1;
    transform: scale(1.05);
}

/* Przycisk w trybie edycji (Gotowe) */
#manage-favorites.btn-success {
    opacity: 1;
    font-weight: 600;
}

/* Styl dla pozycji ulubionych */
#favorites-items .nav-link {
    background: rgba(255, 193, 7, 0.1);
    border-left: 3px solid #ffc107;
}

#favorites-items .nav-link:hover {
    background: rgba(255, 193, 7, 0.2);
    border-left-color: #ffb300;
}

/* Przyciski gwiazdek w trybie edycji */
.favorite-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 193, 7, 0.2);
    border: 1px solid rgba(255, 193, 7, 0.4);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.favorite-toggle:hover {
    background: rgba(255, 193, 7, 0.4);
    border-color: #ffc107;
    transform: translateY(-50%) scale(1.1);
}

.favorite-toggle i {
    font-size: 14px;
    color: #ffc107;
}

.favorite-toggle.is-favorite i {
    color: #ff9800;
}

.favorite-toggle.is-favorite i::before {
    content: "\F04CE"; /* mdi-star */
}

/* Tryb zarządzania ulubionymi */
body.favorites-manage-mode .navbar-nav .nav-link {
    padding-right: 50px; /* Zrób miejsce na przycisk gwiazdki */
}

/* Badge'y w trybie edycji - więcej miejsca */
body.favorites-manage-mode .navbar-nav .nav-link .badge {
    margin-right: 35px; /* Odstaw badge od gwiazdki */
}

body.favorites-manage-mode .favorite-toggle {
    animation: fadeInScale 0.3s ease;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translateY(-50%) scale(0.5);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
}

/* Komunikat o braku ulubionych */
.empty-favorites-info {
    text-align: center;
    padding: 0.75rem 1rem;
    background: rgba(255, 193, 7, 0.05);
    border-radius: 0.375rem;
    margin: 0.25rem 0.5rem;
    border: 1px dashed rgba(255, 193, 7, 0.2);
}

.empty-favorites-info i {
    font-size: 1.1rem;
    vertical-align: middle;
    margin-right: 0.25rem;
}

/* Responsywność - mobile */
@media (max-width: 768px) {
    .compact-menu-header {
        margin: 0.5rem !important;
    }
    
    .weather-compact {
        margin: 0;
    }
    
    .navbar-nav .nav-link {
        padding: 0.4rem 0.8rem;
    }
    
    /* Przyciski gwiazdek na mobile */
    .favorite-toggle {
        width: 32px;
        height: 32px;
    }
    
    body.favorites-manage-mode .navbar-nav .nav-link {
        padding-right: 50px;
    }
}

/* Dark theme compatibility */
[data-bs-theme="dark"] .menu-status-bar {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .weather-widget-card {
    border-color: rgba(255, 255, 255, 0.2) !important;
}

[data-bs-theme="dark"] .navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

/* Dark mode dla ulubionych */
[data-bs-theme="dark"] .empty-favorites-info {
    background: rgba(255, 193, 7, 0.1);
    border-color: rgba(255, 193, 7, 0.3);
}

[data-bs-theme="dark"] #manage-favorites {
    opacity: 0.9;
}

[data-bs-theme="dark"] #manage-favorites:hover {
    opacity: 1;
}

[data-bs-theme="dark"] .favorite-toggle {
    background: rgba(255, 193, 7, 0.15);
    border-color: rgba(255, 193, 7, 0.3);
}

[data-bs-theme="dark"] .favorite-toggle:hover {
    background: rgba(255, 193, 7, 0.25);
}

/* Scrollbar styling dla menu */
#scrollbar {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.05);
}

#scrollbar::-webkit-scrollbar {
    width: 6px;
}

#scrollbar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

#scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    transition: background 0.3s ease;
}

#scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Tooltip dla badge'ów */
.badge[title]:hover {
    cursor: help;
    transform: scale(1.1);
}

/* Prosta gwiazdka w ulubionych */
.menu-title .ri-star-fill {
    animation: none;
    vertical-align: middle;
}

/* Loading animation dla liczników */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.badge.loading {
    background: linear-gradient(90deg, #6c757d 0%, #adb5bd 50%, #6c757d 100%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* ========================================
   MODAL POGODY - REDESIGN Z CHARAKTEREM
   ======================================== */

.weather-modal-custom {
    border-radius: 1rem;
    overflow: hidden;
}

.weather-forecast-timeline {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.weather-forecast-timeline::-webkit-scrollbar {
    width: 6px;
}

.weather-forecast-timeline::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
    border-radius: 10px;
}

.weather-forecast-timeline::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.5);
    border-radius: 10px;
}

.weather-forecast-timeline::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.7);
}

.weather-hour-card {
    animation: slideInFromRight 0.3s ease-out;
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.weather-hour-card.active {
    box-shadow: 0 8px 16px rgba(0,0,0,0.2) !important;
    border: 2px solid rgba(255,255,255,0.3);
}

.weather-hour-card .time-display {
    font-family: 'Segoe UI', system-ui, sans-serif;
}

.weather-hour-card .temp-display h2 {
    font-size: 2.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.weather-details {
    font-size: 0.95rem;
    font-weight: 500;
}

.weather-details i {
    vertical-align: middle;
}

/* Animacja dla badge "Teraz" */
.weather-hour-card .badge {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.05);
        opacity: 0.9;
    }
}

/* Dark mode dla modalu pogody */
[data-bs-theme="dark"] .weather-modal-custom {
    background-color: #1a1d29;
}

[data-bs-theme="dark"] .weather-forecast-timeline::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
}

/* Responsywność modalu */
@media (max-width: 768px) {
    .weather-hour-card .col-3,
    .weather-hour-card .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
        text-align: center !important;
    }
    
    .weather-hour-card .row {
        gap: 0.5rem;
    }
    
    .weather-details {
        justify-content: center !important;
    }
}

/* ========================================
   Stan konta gracza - stylizacja
   ======================================== */

/* Przyciski w ciemnym motywie - białe obramowanie */
[data-bs-theme="dark"] .player-balance-box .balance-btn {
    border-color: rgba(255, 255, 255, 0.5) !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

[data-bs-theme="dark"] .player-balance-box .balance-btn:hover {
    border-color: rgba(255, 255, 255, 0.9) !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
}

/* Lewa ramka w ciemnym motywie - jaśniejsza */
[data-bs-theme="dark"] .player-balance-box {
    border-left-color: rgba(16, 185, 129, 0.8) !important;
}
