/* PP Shipping Estimate - "Odbiór osobisty" (personal pickup): the second tile and its window.
 *
 * A file of its own on purpose (1.20.0): the base rules stay in ppshippingestimate.css, which
 * browsers may still hold in their cache. Everything here is scoped to .ppse-tiles / .ppse-pk, so
 * a product without pickup renders exactly as before.
 */

/* ------------------------------------------------------------------ the two tiles */
.ppse-stack--duo {
    display: flex;
    width: 100%;
    max-width: 460px;
}

.ppse-tiles {
    display: flex;
    gap: 8px;
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
}

.ppse-tiles > .ppse-shipping-estimate {
    margin: 0;
}

.ppse-tile--delivery {
    flex: 1.75 1 0;
    min-width: 0;
}

.ppse-tile--pickup {
    flex: 1 1 0;
    min-width: 0;
    background: #f3faf6;
    border: 1px dashed #9fd2b5;
    gap: 2px;
}

.ppse-tile--pickup:hover {
    background: #eaf6ef;
    border-color: #6fbf92;
}

.ppse-tile--pickup:focus-visible {
    outline: 2px solid #1a7f4b;
    outline-offset: 2px;
}

.ppse-tile--pickup .ppse-icon {
    color: #1a7f4b;
}

.ppse-tile-head {
    gap: 6px;
}

.ppse-tile-price {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.2;
    color: #1a7f4b;
}

.ppse-tile-sub {
    font-size: 0.85rem;
    color: #5b6f80;
    line-height: 1.3;
}

/* The address line is for the pickup-only layout; next to a delivery price the tile stays short. */
.ppse-tile-addr {
    display: none;
    font-size: 0.82rem;
    color: #6b7f90;
}

.ppse-tiles--solo .ppse-tile-addr {
    display: block;
}

.ppse-tiles--solo {
    max-width: 460px;
}

/* The delivery tile, narrower than before: label on top, price below, the date as a quiet line.
   Same elements as ever (the script updates them by id); only their layout changes. */
.ppse-tiles--duo .ppse-tile--delivery .ppse-row--price {
    flex-wrap: wrap;
    row-gap: 2px;
}

.ppse-tiles--duo .ppse-tile--delivery .ppse-row--price .ppse-label {
    flex: 1 1 calc(100% - 24px);
    min-width: 0;
}

.ppse-tiles--duo .ppse-tile--delivery .ppse-row--price .ppse-value {
    margin-left: 0;
    padding-left: 0;
    text-align: left;
    font-size: 1.15rem;
    line-height: 1.2;
}

.ppse-tiles--duo .ppse-tile--delivery .ppse-row--date {
    border-top: 0;
    padding-top: 0;
    margin-top: 0;
    font-size: 0.85rem;
    flex-wrap: nowrap;
}

.ppse-tiles--duo .ppse-tile--delivery .ppse-row--date .ppse-label {
    display: none;
}

.ppse-tiles--duo .ppse-tile--delivery .ppse-row--date .ppse-value {
    margin-left: 0;
    padding-left: 0;
    text-align: left;
    white-space: normal;
}

.ppse-tiles--duo .ppse-tile--delivery .ppse-row--date .ppse-delivery-date strong {
    font-weight: 600;
    font-size: 0.85rem;
}

/* ------------------------------------------------------------------ phones */
@media (max-width: 767px) {
    .ppse-stack--duo {
        max-width: none;
    }

    .ppse-tiles {
        gap: 6px;
    }

    .ppse-tile--delivery {
        flex: 1.55 1 0;
    }

    .ppse-tile-price,
    .ppse-tiles--duo .ppse-tile--delivery .ppse-row--price .ppse-value {
        font-size: 1.05rem;
    }

    .ppse-tile-sub {
        font-size: 0.8rem;
    }

    /* The date row of the delivery tile stays one clean line; the base rules for phones keep the
       label hidden for this layout (only the date is shown). */
    .ppse-tiles--duo .ppse-tile--delivery .ppse-row--date .ppse-delivery-date {
        font-size: 0.8rem;
    }
}

@media (max-width: 380px) {
    .ppse-tiles .ppse-shipping-estimate {
        padding: 8px 9px;
    }

    .ppse-tiles--duo .ppse-tile--delivery .ppse-bc-courier {
        display: none;
    }
}

/* ------------------------------------------------------------------ the pickup window */
.ppse-modal--pickup .ppse-modal-container {
    max-width: 520px;
}

.ppse-pk {
    display: flex;
    flex-direction: column;
    gap: 14px;
    color: #2c3e50;
}

.ppse-pk-ready {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #cfe8d9;
    border-radius: 10px;
    background: #f3faf6;
}

.ppse-pk-ico {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #dcf2e5;
    color: #1a7f4b;
}

.ppse-pk-ready-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.ppse-pk-ready-text small {
    font-size: 0.78rem;
    color: #5b6f80;
}

.ppse-pk-ready-text strong {
    font-size: 1.05rem;
    font-weight: 700;
}

.ppse-pk-price {
    flex: 0 0 auto;
    padding: 4px 10px;
    border-radius: 6px;
    background: #1a7f4b;
    color: #fff;
    font-weight: 700;
    white-space: nowrap;
}

.ppse-pk-note {
    margin: 0;
    font-size: 0.85rem;
    color: #5b6f80;
}

.ppse-pk-block h4 {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 6px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #6b7f90;
}

.ppse-pk-block h4 svg {
    color: #1a7f4b;
}

.ppse-pk-block address {
    margin: 0 0 6px;
    font-style: normal;
    line-height: 1.5;
}

.ppse-pk-phone {
    margin: 0 0 6px;
}

.ppse-pk-map {
    display: inline-block;
    padding: 7px 12px;
    border: 1px solid #1a6fb5;
    border-radius: 6px;
    color: #1a6fb5;
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
}

.ppse-pk-map:hover {
    background: #1a6fb5;
    color: #fff;
}

.ppse-pk-week {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.ppse-pk-week th,
.ppse-pk-week td {
    padding: 5px 0;
    border-bottom: 1px solid #eef2f5;
    text-align: left;
    font-weight: 400;
}

.ppse-pk-week td {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.ppse-pk-week tr.is-today th,
.ppse-pk-week tr.is-today td {
    font-weight: 700;
    color: #1a7f4b;
}

.ppse-pk-week tr.is-closed td {
    color: #95a5a6;
}

.ppse-pk-steps {
    margin: 0 0 8px;
    padding-left: 20px;
    line-height: 1.5;
}

.ppse-pk-pay,
.ppse-pk-hold {
    margin: 0 0 4px;
    font-size: 0.85rem;
    color: #5b6f80;
}

@media (max-width: 600px) {
    .ppse-modal--pickup .ppse-modal-container {
        max-width: none;
    }

    .ppse-pk-ready {
        padding: 10px 12px;
    }
}
