/* =============================================
   EcoSun XML Reader – Frontend Styles
   ============================================= */

/* --- Section & card list container --- */
.ecosun-section { margin: 1.5em 0; }

.ecosun-cards {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: none;
    border-radius: 16px;
    overflow: hidden;
}

/* --- Individual card (horizontal row) --- */
.ecosun-card {
    display: flex;
    align-items: flex-start;
    gap: 1em;
    padding: 1.15em 1.5em;
    border-bottom: 1px solid #f0f0f0;
    transition: background .12s ease;
}
.ecosun-card:last-child { border-bottom: none; }
.ecosun-card:hover { background: #fafafa; }

/* --- Red circle icon --- */
.ecosun-card__icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #D2232A1A;
    color: #D2232A;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

/* --- Body (title + meta) --- */
.ecosun-card__body { flex: 1; min-width: 0; }

.ecosun-card__title {
    margin: 0 0 .25em;
    font-size: 1.05em;
    font-weight: 700;
    line-height: 1.3;
    color: #000;
}
.ecosun-card__title a {
    color: #000;
    text-decoration: none;
}
.ecosun-card__title a:hover {
    color: #2271b1;
    text-decoration: underline;
}

.ecosun-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .3em;
    font-size: .85em;
    line-height: 1.4;
}

.ecosun-card__verzia {
    font-weight: 600;
    color: #787878;
    text-decoration: none;
}
.ecosun-card__verzia:hover { text-decoration: underline; color: #135e96; }
span.ecosun-card__verzia { color: #787878; }

.ecosun-card__typ {
    color: #444;
    font-weight: 500;
}

.ecosun-card__details { color: #787878; }

.ecosun-card__desc {
    margin-top: .3em;
    font-size: .82em;
    color: #787878;
    line-height: 1.4;
}

.ecosun-card__history {
    color: #787878;
    text-decoration: none;
}
.ecosun-card__history:hover { text-decoration: underline; color: #135e96; }

/* --- Button (right-aligned) --- */
.ecosun-card__actions {
    flex-shrink: 0;
    margin-left: auto;
    padding-top: 2px;
}

.ecosun-btn {
    display: inline-block;
    padding: .5em 1.25em;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: .85em;
    white-space: nowrap;
    transition: background .12s ease;
}
.ecosun-btn--primary { background: #787878; color: #fff; }
.ecosun-btn--primary:hover { background: #5a5a5a; color: #fff; }

.ecosun-download-detail .ecosun-btn--primary { background: #D2232A; }
.ecosun-download-detail .ecosun-btn--primary:hover { background: #b01d23; }

/* --- Responsive: stack on narrow screens --- */
@media (max-width: 600px) {
    .ecosun-card { flex-wrap: wrap; }
    .ecosun-card__icon { display: none; }
    .ecosun-card__actions { margin-left: 0; width: 100%; }
    .ecosun-card__actions .ecosun-btn { width: 100%; text-align: center; }
}

/* =============================================
   Download detail page
   ============================================= */
.ecosun-download-detail { max-width: 640px; margin: 1.5em 0; }
.ecosun-download-detail__app { margin: 0 0 .4em; }
.ecosun-download-detail__verzia,
.ecosun-download-detail__datum,
.ecosun-download-detail__runtime,
.ecosun-download-detail__history { margin: .35em 0; }
.ecosun-download-detail__download { margin: 1em 0; }
.ecosun-download-detail__desc { margin-top: 1em; color: #444; }

/* =============================================
   História zmien page
   ============================================= */
.ecosun-historia { max-width: 720px; margin: 1.5em 0; }
.ecosun-historia__version {
    padding: 1.25em 0;
}
.ecosun-historia__version + .ecosun-historia__version {
    border-top: 1px solid #e2e2e2;
}
.ecosun-historia__header {
    font-weight: 700;
    font-size: 1em;
    color: #1d2327;
    margin-bottom: .5em;
}
.ecosun-historia__items {
    margin: 0;
    padding-left: 1.25em;
}
.ecosun-historia__items li {
    margin: .3em 0;
    line-height: 1.5;
}
