/* Plik: widget-dnia.css - v3.6 Hybrid Header */

/* 1. RESET KONTENERA */
.widget-dnia-card {
    all: initial;
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    color: #334155;
    line-height: 1.4;
}
.widget-dnia-card * { box-sizing: border-box; }

.wd-icon-img {
    width: 24px;
    height: 24px;
}

.mt-1 .wd-icon-img {
    width: 18px;
    height: 18px;
}

/* Ikony walut */
.wd-curr-icon {
    width: 20px;       /* Szerokość ikony */
    height: 15px;      /* Wysokość ikony (dostosuj do proporcji swoich flag) */
    object-fit: contain; /* Zachowuje proporcje */
    vertical-align: middle;
    margin-right: 8px; /* Odstęp od nazwy waluty */
    display: inline-block;
}

.wd-box {
    background: #ffffff;
    padding: 2px 10px;
    margin: 0 0 20px 0;
    border-radius: 12px;
}

.wd-box-events {
    padding: 13px 10px;
}

.wd-box-promo {
    background: #f0f9ff;
}

.wd-box-trivia {
    background: #f5f6f5;
    border-left: 3px solid #75aa8e;
}

/* Kontener musi mieć position: relative (jest już dodane w HTML inline, ale warto mieć w CSS) */
.wd-trivia-box {
    position: relative;
    /* Dodajemy margines z prawej dla tekstu, żeby nie wjechał pod ikonę */
    padding-right: 50px; 
}

/* Stylizacja samej ikony w rogu */
.wd-trivia-icon {
    position: absolute;
    top: 5px;
    right: 0;
    width: 24px;
    height: 24px;
    opacity: 0.8;
}

/* Opcjonalnie: poprawka dla tekstu, żeby ładnie wyglądał obok */
.wd-trivia-text {
    text-align: left;
    font-size: 0.95em;
}

/* 2. HEADER */
.wd-top {
    text-align: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 10px;
}
.wd-greeting {
    display: block;
    font-size: 10px; font-weight: 700; text-transform: uppercase; color: #0284c7; letter-spacing: 0.5px;
    margin-bottom: 4px;
}

/* Kontener daty z przyciskami */
.wd-date-container { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    padding: 0 2px;
}
.wd-nav-btn {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #cbd5e1;
    cursor: pointer;
    padding: 0 8px;
    transition: color 0.2s;
}
.wd-nav-btn:hover { color: #0284c7; }

/* Środek nagłówka - dynamiczny */
.wd-date-center {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 42px; /* Stała wysokość, żeby nie skakało przy zmianie widoku */
}

/* STYL: DZIŚ (Domyślny) */
.wd-dayname {
    font-size: 20px;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.1;
    margin-bottom: 2px;
}
.wd-fulldate {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
}

/* STYL: PRZEGLĄDANIE (Gdy zmienisz miesiąc) */
.wd-today-label,
.wd-browse-label {
    font-size: 9px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    line-height: 1.2;
    margin-top: 10px;
}
.wd-browse-month {
    font-size: 16px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 2px;
}
.wd-back-btn {
    background: none;
    border: none;
    padding: 0;
    font-size: 10px;
    color: #0284c7;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
}
.wd-back-btn:hover { text-decoration: underline; color: #0284c7;}

.wd-back-btn:hover {
    background: transparent;
    color: #0284c7;
}


/* 3. KALENDARZ */
.wd-calendar-wrapper { padding: 10px; border-radius: 8px; margin-bottom: 15px; }
.wd-cal-header { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 5px; }
.wd-cal-header span { font-size: 9px; font-weight: 700; color: #94a3b8; text-align: center; text-transform: uppercase; }
.wd-cal-header span.we { color: #f43f5e; }
.wd-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }

.wd-day { 
    aspect-ratio: 1; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 11px; 
    font-weight: 500; 
    color: #64748b; 
    border-radius: 6px; 
    position: relative; 
    cursor: default; 
}
.wd-day.weekend { color: #f43f5e; font-weight: 600; }
.wd-day.current { background: #3b82f6; color: #fff !important; font-weight: 700; border-radius: 50%; }

/* Trójkącik tooltipa */
.wd-day.has-tooltip::after {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 0;
    height: 0;
}
.wd-day.current.has-tooltip::after { border-color: transparent rgba(255,255,255,0.7) transparent transparent; }

/* Tooltip */
.wd-day.has-tooltip:hover { background-color: #e2e8f0; border-radius: 4px; }
.wd-day.current.has-tooltip:hover { background-color: #0284c7; border-radius: 50%; } 

.wd-day.has-tooltip:hover::before { 
    content: attr(data-tooltip); 
    position: absolute; 
    bottom: 100%; 
    left: 50%; 
    transform: translateX(-50%); 
    background: #1e293b; 
    color: #fff; 
    padding: 4px 8px; 
    border-radius: 4px; 
    font-size: 10px; 
    white-space: nowrap; 
    z-index: 999; 
    pointer-events: none;
    margin-bottom: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 4. POZOSTAŁE SEKCJE */
.wd-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 5px; }
.wd-stat { flex: 1 1 45%;  padding: 8px 10px; border-radius: 6px; display: flex; flex-direction: column; }
.wd-stat.full-width { flex: 1 1 100%; }
.wd-stat.astro-column { display: flex; flex-direction: column; gap: 8px; padding: 10px; }
.wd-astro-row { display: flex; justify-content: space-between; align-items: center; width: 100%; border-bottom: 1px dashed rgba(0,0,0,0.05); padding-bottom: 4px; }
.wd-astro-row:last-child { border-bottom: none; padding-bottom: 0; margin-top: 2px; }
.wd-stat-label { font-size: 9px; font-weight: 700; color: #94a3b8; text-transform: uppercase; }
.wd-stat-val { font-size: 14px; font-weight: 700; color: #334155; }
.wd-stat-val-small { font-size: 11px; font-weight: 600; color: #334155; }

.wd-section { margin-bottom: 15px; }
.wd-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.wd-icon-box { width: 24px; height: 24px; color: #3b82f6; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.wd-icon-box.holiday { background: #fef2f2; color: #ef4444; }
.wd-text-box { flex: 1; min-width: 0; }
.wd-label { font-size: 9px; color: #94a3b8; font-weight: 700; text-transform: uppercase; display: block; }
.wd-content { font-size: 12px; font-weight: 200; color: #334155; line-height: 1.2; }
.holiday-text { color: #2e2e2e; }

.wd-promo-box { padding: 15px; border-radius: 8px; text-align: center; margin-bottom: 15px; }
.wd-promo-title { font-size: 12px; font-weight: 800; color: #0284c7; text-transform: uppercase; display: block; margin-bottom: 4px; }
.wd-promo-text { font-size: 11px; color: #475569; display: block; margin-bottom: 10px; }
.wd-counter { font-weight: 800; }
.wd-btn { display: block; width: 100%; background: #0284c7; color: #fff; padding: 8px 0; border-radius: 6px; text-decoration: none; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.wd-btn:hover { background: #77ba8f; color: #fff; }

.wd-mini-header { font-size: 10px; font-weight: 700; color: #94a3b8; text-transform: uppercase; margin-bottom: 8px; border-bottom: 1px dashed #e2e8f0; padding-bottom: 2px; }
.wd-currency-list { display: flex; flex-direction: column; gap: 4px; }
.wd-currency-row { display: flex; justify-content: space-between; align-items: center; padding: 6px; border-radius: 4px; }
.wd-currency-row:hover { background: #f8fafc; }
.wd-curr-left { display: flex; align-items: center; gap: 8px; }
.wd-curr-left img { width: 18px; display: block; }
.wd-code { font-size: 11px; font-weight: 700; color: #475569; }
.wd-curr-right { text-align: right; }
.wd-rate { display: block; font-size: 11px; font-weight: 600; color: #334155; }
.wd-change { font-size: 9px; font-weight: 700; padding: 1px 4px; border-radius: 3px; display: inline-block; }
.trend-up { background: #dcfce7; color: #166534; }
.trend-down { background: #fee2e2; color: #991b1b; }

.wd-trivia-box { padding: 10px; border-radius: 4px; margin-bottom: 10px; }
.wd-trivia-title { font-size: 9px; font-weight: 800; color: #75aa8e; text-transform: uppercase; margin-bottom: 2px; display: block;}
.wd-trivia-text { font-size: 11px; color: #451a03; }
.wd-footer { text-align: center; font-size: 9px; color: #94a3b8; border-top: 1px solid #f1f5f9; padding-top: 8px; }