.ewd-widget {
    max-width: 900px;
    margin: 0 auto;
    font-family: inherit;
    color: #1c1f24;
    background: #e2e4e8;
    padding: 20px;
    border-radius: 12px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.ewd-widget.ewd-dark {
    background: #26292f;
    color: #e5e7eb;
    padding: 20px;
    border-radius: 12px;
}

.ewd-icon-row {
    text-align: right;
    margin-bottom: 4px;
}

.ewd-weather-icon {
    font-size: 1.8rem;
    line-height: 1;
}

.ewd-bottom-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 10px;
}

.ewd-icon-btn {
    background: none;
    border: 1px solid #e9ebee;
    border-radius: 999px;
    width: 26px;
    height: 26px;
    font-size: 0.8rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ewd-dark .ewd-icon-btn {
    border-color: #383e47;
}

.ewd-date {
    font-size: 1.05rem;
    font-weight: 600;
    text-transform: capitalize;
    margin: 0 0 6px;
    letter-spacing: -0.01em;
}

.ewd-summary {
    font-size: 0.92rem;
    color: #6b7280;
    margin: 0 0 2px;
    font-weight: 400;
}

.ewd-tip-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    margin: 0 0 4px;
}

.ewd-tip {
    font-size: 0.88rem;
    color: #6b7280;
    margin: 0;
    min-height: 1px;
    font-weight: 400;
}

.ewd-pranostika {
    font-size: 0.86rem;
    color: #9ca3af;
    margin: 0 0 20px;
    font-style: italic;
}

.ewd-forecast {
    font-size: 0.76rem;
    color: #9ca3af;
    margin-top: 6px;
    font-weight: 400;
}

.ewd-frost-warning {
    font-size: 0.76rem;
    font-weight: 600;
    color: #2563eb;
    margin-top: 6px;
}

.ewd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    margin: 0 0 14px;
}

.ewd-tile {
    background: #ffffff;
    border: 1px solid #e9ebee;
    border-top: 7px solid #d7dade;
    border-radius: 8px;
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ewd-tile-label {
    font-size: 0.7rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 2px;
}

.ewd-tile-value {
    font-size: 1.45rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #14181f;
}

.ewd-trend {
    font-size: 0.78rem;
    font-weight: 600;
    color: #9ca3af;
    white-space: nowrap;
    margin-top: 2px;
}

.ewd-trend-up {
    color: #c96a86;
}

.ewd-trend-down {
    color: #6b8299;
}

.ewd-minmax {
    font-size: 0.78rem;
    font-weight: 500;
    margin-top: 4px;
    color: #9ca3af;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.ewd-minmax-high,
.ewd-minmax-low {
    white-space: nowrap;
}

.ewd-minmax-high {
    color: #c96a86;
}

.ewd-minmax-low {
    color: #6b8299;
}

.ewd-suntimes {
    font-size: 0.78rem;
    color: #9ca3af;
    margin-top: 4px;
    white-space: nowrap;
}

.ewd-loading,
.ewd-error {
    text-align: center;
    padding: 24px;
    color: #9ca3af;
    font-size: 0.9rem;
}

.ewd-error {
    color: #b42318;
}

.ewd-updated {
    text-align: right;
    font-size: 0.74rem;
    color: #b0b5bd;
    margin: 0;
    font-weight: 400;
    white-space: nowrap;
}

.ewd-divider {
    border: none;
    border-top: 1px solid #eceef1;
    margin: 24px 0 18px;
}

.ewd-records-title {
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 12px;
    color: #9ca3af;
}

.ewd-grid-small {
    grid-template-columns: repeat(auto-fit, minmax(95px, 1fr));
}

.ewd-tile-small {
    padding: 10px 12px 12px;
}

.ewd-tile-small .ewd-tile-label {
    font-size: 0.62rem;
}

.ewd-tile-small .ewd-tile-value {
    font-size: 1.05rem;
    font-weight: 600;
}

.ewd-records-date {
    font-size: 0.68rem;
    color: #b0b5bd;
    margin-top: 2px;
}

/* ---------- Tmavý režim ---------- */

.ewd-dark .ewd-tile {
    background: #2f333b;
    border-color: #3a3f48;
    border-top-color: #7d8590;
}

.ewd-dark .ewd-tile-label {
    color: #7d8590;
}

.ewd-dark .ewd-tile-value {
    color: #f2f3f5;
}

.ewd-dark .ewd-summary,
.ewd-dark .ewd-tip {
    color: #9aa1ab;
}

.ewd-dark .ewd-pranostika {
    color: #7d8590;
}

.ewd-dark .ewd-trend,
.ewd-dark .ewd-minmax,
.ewd-dark .ewd-suntimes,
.ewd-dark .ewd-forecast,
.ewd-dark .ewd-updated,
.ewd-dark .ewd-records-date {
    color: #7d8590;
}

.ewd-dark .ewd-trend-up,
.ewd-dark .ewd-minmax-high {
    color: #e08aa3;
}

.ewd-dark .ewd-trend-down,
.ewd-dark .ewd-minmax-low {
    color: #8ba6bc;
}

.ewd-dark .ewd-frost-warning {
    color: #6ea8fe;
}

.ewd-dark .ewd-divider {
    border-top-color: #2e333c;
}

.ewd-dark .ewd-records-title {
    color: #7d8590;
}

.ewd-dark .ewd-loading,
.ewd-dark .ewd-error {
    color: #7d8590;
}

.ewd-flash {
    animation: ewd-flash-anim 1.4s ease-out;
}

@keyframes ewd-flash-anim {
    0% {
        background-color: rgba(255, 196, 0, 0.35);
    }
    100% {
        background-color: transparent;
    }
}
