/* Woku Simple Variation Picker v0.1.3 */

.woku-plan-picker {
    min-width: 0;
    margin: 0 0 2rem;
    padding: 0;
    border: 0;
}

.woku-plan-picker__title {
    margin: 0 0 1.2rem;
    color: #171922;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.35;
}

.woku-plan-picker__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.9rem;
}

.woku-plan-picker__item {
    min-width: 0;
}

.woku-plan-picker__input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.woku-plan-picker__card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(5.5rem, 0.58fr) minmax(0, 1.7fr) auto;
    grid-template-areas:
        "name summary price"
        "name description price";
    align-items: center;
    column-gap: 1.4rem;
    row-gap: 0.25rem;
    min-height: 7.4rem;
    padding: 1.15rem 1.4rem;
    border: 1.5px solid #dfe3ea;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(17, 24, 39, 0.04);
    cursor: pointer;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.woku-plan-picker__card:hover {
    border-color: #f0543c;
    box-shadow: 0 5px 14px rgba(240, 84, 60, 0.1);
}

.woku-plan-picker__input:checked + .woku-plan-picker__card {
    border-color: #ea3218;
    background: #fff8f6;
    box-shadow: 0 0 0 2px rgba(234, 50, 24, 0.1);
}

.woku-plan-picker__input:checked + .woku-plan-picker__card::after {
    content: "✓";
    position: absolute;
    top: -0.7rem;
    right: -0.7rem;
    display: grid;
    place-items: center;
    width: 2.2rem;
    height: 2.2rem;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #ea3218;
    box-shadow: 0 2px 6px rgba(159, 31, 14, 0.2);
    color: #fff;
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1;
}

.woku-plan-picker__input:focus-visible + .woku-plan-picker__card {
    outline: 3px solid rgba(20, 105, 210, 0.38);
    outline-offset: 3px;
}

.woku-plan-picker__input:disabled + .woku-plan-picker__card {
    opacity: 0.5;
    cursor: not-allowed;
}

.woku-plan-picker__header {
    display: contents;
}

.woku-plan-picker__name {
    grid-area: name;
    color: #171922;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.woku-plan-picker__price {
    grid-area: price;
    min-width: 10rem;
    color: #e82f16;
    text-align: right;
    white-space: nowrap;
}

.woku-plan-picker__price .price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    color: #e82f16;
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1.25;
}

.woku-plan-picker__price del {
    order: 2;
    display: block;
    margin-top: 0.2rem;
    color: #8a8f99;
    font-size: 1.15rem;
    font-weight: 500;
    line-height: 1.25;
}

.woku-plan-picker__price ins {
    order: 1;
    text-decoration: none;
}

/* The theme colors nested WooCommerce amounts independently. Keep the active
 * plan price aligned with the product-page accent, while the old price stays
 * visually secondary. */
.woku-plan-picker__price ins .woocommerce-Price-amount,
.woku-plan-picker__price > .price > .woocommerce-Price-amount {
    color: #e82f16 !important;
    font-size: 1.65rem !important;
    font-weight: 800 !important;
}

.woku-plan-picker__price del .woocommerce-Price-amount {
    color: #8a8f99 !important;
    font-size: 1.15rem !important;
    font-weight: 500 !important;
}

.woku-plan-picker__summary {
    grid-area: summary;
    color: #343944;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.4;
}

.woku-plan-picker__description {
    grid-area: description;
    overflow: hidden;
    color: #686e78;
    font-size: 1.2rem;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.woku-plan-picker__stock {
    grid-area: description;
    color: #b42318;
    font-size: 1.2rem;
    font-weight: 700;
}

.woku-plan-picker-ready .pd-option > .title-info,
.woku-plan-picker-ready .pd-option > table.variations,
.woku-plan-picker-ready .pd-option > .reset_variations {
    display: none !important;
}

.woku-plan-picker-ready .pd-option {
    padding-top: 0;
}

@media (max-width: 767px) {
    .woku-plan-picker__card {
        grid-template-columns: minmax(4.8rem, 0.55fr) minmax(0, 1.35fr) auto;
        grid-template-areas:
            "name summary price"
            "description description description";
        min-height: 0;
        padding: 1.15rem 1.2rem;
        column-gap: 1rem;
        row-gap: 0.7rem;
    }

    .woku-plan-picker__name {
        font-size: 1.8rem;
    }

    .woku-plan-picker__price {
        min-width: 8.5rem;
    }

    .woku-plan-picker__price .price {
        font-size: 1.55rem;
    }

    .woku-plan-picker__summary {
        font-size: 1.2rem;
    }

    .woku-plan-picker__description {
        padding-top: 0.65rem;
        border-top: 1px solid #eceef2;
        white-space: normal;
    }
}

@media (max-width: 420px) {
    .woku-plan-picker__card {
        grid-template-columns: 4.5rem minmax(0, 1fr);
        grid-template-areas:
            "name price"
            "summary summary"
            "description description";
    }

    .woku-plan-picker__price {
        min-width: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .woku-plan-picker__card {
        transition: none;
    }
}
