* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    background: transparent;
    font-family: Arial, Helvetica, sans-serif;
    color: #142018;
}

body {
    overflow: hidden;
}

/* A megrendelő által kért kb. 512 x 355 arányú kártya. */
.za-widget {
    width: 100%;
    max-width: 512px;
    aspect-ratio: 512 / 355;
    overflow: hidden;
    border: 1px solid #d8e1da;
    border-radius: 8px;
    background: #ffffff;
    margin: 0 auto;
    box-shadow: 0 3px 12px rgba(20, 32, 24, 0.12);
}

.za-widget-link {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.za-widget-link:focus {
    outline: 3px solid rgba(48, 116, 67, 0.35);
    outline-offset: -3px;
}

/* 16:9 kép: 512 px szélességnél 288 px magas, pont a mintához hasonló. */
.za-media {
    position: relative;
    flex: 0 0 auto;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #e8eee9;
}

.za-image,
.za-image-placeholder {
    width: 100%;
    height: 100%;
}

.za-image {
    display: block;
    object-fit: cover;
    object-position: center;
}

.za-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5b6a5e;
    font-size: 16px;
    font-weight: 700;
    background: linear-gradient(135deg, #eef3ef, #dce6de);
}

/* A mintán nincs külön badge. */
.za-badge {
    display: none;
}

/* Aktív aukciónál a CTA közvetlenül a kép jobb alsó sarkán ül. */
.za-media-cta {
    display: none;
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 3;
    min-height: 46px;
    padding: 10px 15px;
    border: 2px solid #d99b3f;
    border-radius: 6px;
    background: #0d6efd;
    color: #ffffff;
    font-size: 16px;
    line-height: 1;
    font-weight: 800;
    white-space: nowrap;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.25);
}

.za-state-active .za-media-cta {
    display: inline-flex;
}

.za-widget-link:hover .za-media-cta {
    background: #0b5ed7;
}

/* Alsó, keskeny információs sáv. */
.za-content {
    flex: 1 1 auto;
    min-height: 0;
    padding: 7px 8px 6px;
}

.za-state-active .za-content {
    display: grid;
    grid-template-columns: 54% 46%;
    align-items: center;
    column-gap: 6px;
}

.za-kicker {
    margin-bottom: 3px;
    color: #637067;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.35px;
}

.za-state-active .za-kicker {
    display: none;
}

.za-title {
    display: -webkit-box;
    max-height: 48px;
    margin: 0;
    overflow: hidden;
    color: #17231a;
    font-size: 22px;
    line-height: 1.08;
    font-weight: 800;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.za-state-active .za-title {
    align-self: center;
    padding-right: 4px;
}

.za-active-panel,
.za-upcoming-panel,
.za-empty-panel {
    min-width: 0;
    min-height: 0;
}

.za-state-active .za-active-panel {
    align-self: center;
}

.za-price-label,
.za-upcoming-label {
    margin-bottom: 3px;
    color: #637067;
    font-size: 10px;
    line-height: 1;
    font-weight: 700;
}

.za-price-line {
    display: flex;
    align-items: center;
    min-width: 0;
    white-space: nowrap;
}

.za-price {
    display: flex;
    align-items: center;
    gap: 2px;
    min-width: 0;
    color: #17231a;
}

.za-price-digit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 36px;
    border: 1px solid #d8dee4;
    border-radius: 5px;
    background: #ffffff;
    color: #17231a;
    font-size: 19px;
    line-height: 1;
    font-weight: 800;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.09);
}

.za-price-digit-group-gap {
    margin-left: 3px;
}

.za-price-unit {
    margin-left: 5px;
    color: #495057;
    font-size: 11px;
    font-weight: 800;
}

/* A korábbi, tartalmi CTA aktív állapotban már nem kell. */
.za-state-active .za-active-panel > .za-cta {
    display: none;
}

.za-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 7px 11px;
    border-radius: 6px;
    background: #0d6efd;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}

.za-widget-link:hover .za-cta {
    background: #0b5ed7;
}

.za-upcoming-time {
    margin: 2px 0 7px;
    color: #1c542c;
    font-size: 16px;
    line-height: 1.15;
    font-weight: 900;
}

.za-cta-muted {
    background: #6c7a6f;
}

.za-widget-link:hover .za-cta-muted {
    background: #59665c;
}

.za-empty-message {
    margin: 3px 0 0;
    color: #3e5243;
    font-size: 14px;
    line-height: 1.25;
    font-weight: 800;
}

/* Ha nincs FUTÓ aukció, a widget saját tartalma se jelenjen meg.
   A befoglaló iframe méretét a postMessage-es embed kód 1x1 px-re csukja. */
.za-state-upcoming,
.za-state-empty {
    display: none !important;
}

.is-hidden {
    display: none !important;
}

@media (max-width: 460px) {
    .za-media-cta {
        right: 9px;
        bottom: 9px;
        min-height: 40px;
        padding: 8px 12px;
        font-size: 14px;
    }

    .za-content {
        padding: 6px 6px 5px;
    }

    .za-state-active .za-content {
        grid-template-columns: 53% 47%;
        column-gap: 4px;
    }

    .za-title {
        font-size: 19px;
    }

    .za-price-digit {
        width: 21px;
        height: 32px;
        font-size: 17px;
    }

    .za-price-digit-group-gap {
        margin-left: 2px;
    }

    .za-price-unit {
        margin-left: 3px;
        font-size: 10px;
    }
}

@media (max-width: 360px) {
    .za-title {
        font-size: 17px;
    }

    .za-price-digit {
        width: 18px;
        height: 29px;
        font-size: 15px;
    }

    .za-media-cta {
        min-height: 36px;
        font-size: 12px;
    }
}
