.nnweb-access-selector {
    margin: 0 0 20px;
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.nnweb-access-selector__title {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: 0.01em;
}

.nnweb-access-selector__hint {
    margin: 0 0 12px;
    font-size: 13px;
    line-height: 1.45;
    color: #64748b;
}

.nnweb-access-selector__grid {
    display: grid;
    gap: 10px;
    padding-top: 6px;
}

.nnweb-access-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    overflow: visible;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.nnweb-access-option.has-feature-badge {
    margin-top: 10px;
}

.nnweb-access-option:hover {
    border-color: #cbd5e1;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.nnweb-access-option.is-selected {
    border-color: var(--nnweb-plan-border-selected, #2563eb);
    box-shadow: var(--nnweb-plan-shadow-selected, 0 10px 24px rgba(37, 99, 235, 0.15));
    transform: translateY(-1px);
}

.nnweb-access-option__input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.nnweb-access-option__radio {
    width: 20px;
    height: 20px;
    border: 2px solid #94a3b8;
    border-radius: 999px;
    flex: 0 0 20px;
    position: relative;
}

.nnweb-access-option.is-selected .nnweb-access-option__radio {
    border-color: var(--nnweb-plan-border-selected, #2563eb);
}

.nnweb-access-option.is-selected .nnweb-access-option__radio::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 999px;
    background: var(--nnweb-plan-border-selected, #2563eb);
}

.nnweb-access-option__body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    min-width: 0;
}

.nnweb-access-option__main {
    flex: 1 1 auto;
    min-width: 0;
}

.nnweb-access-option__aside {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    flex: 0 0 auto;
    gap: 2px;
    text-align: right;
}

.nnweb-access-option__feature-badge {
    position: absolute;
    top: 0;
    right: 14px;
    transform: translateY(-50%);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--nnweb-plan-badge-bg, #2563eb);
    color: var(--nnweb-plan-badge-color, #fff);
    font-size: var(--nnweb-plan-badge-font-size, 12px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.01em;
    white-space: nowrap;
    box-shadow: var(--nnweb-plan-badge-shadow, 0 4px 14px rgba(37, 99, 235, 0.28));
}

.nnweb-access-option.is-selected .nnweb-access-option__feature-badge {
    background: var(--nnweb-plan-badge-bg, #2563eb);
}

.nnweb-access-option__savings {
    display: inline-flex;
    align-items: center;
    margin: 0 0 5px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.nnweb-access-option__label {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.3;
}

.nnweb-access-option__price {
    font-size: 17px;
    font-weight: 700;
    color: #111827;
    white-space: nowrap;
    line-height: 1.15;
}

.nnweb-access-option__price .woocommerce-Price-amount {
    font-weight: 700;
}

.nnweb-access-option__compare-price {
    font-size: var(--nnweb-plan-compare-font-size, 13px);
    font-weight: 500;
    color: var(--nnweb-plan-compare-color, #dc2626);
    line-height: 1.2;
    white-space: nowrap;
}

.nnweb-access-option__compare-price .woocommerce-Price-amount {
    color: var(--nnweb-plan-compare-color, #dc2626);
    text-decoration: line-through;
    font-weight: 500;
}

@media (min-width: 640px) {
    .nnweb-access-selector__grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

.single-product .summary .price.nnweb-price-updated {
    transition: opacity 0.15s ease;
}

.single-product .summary .price.nnweb-price-updated.is-updating {
    opacity: 0.55;
}

.nnweb-access-selector--tutor {
    margin: 0;
    padding: 16px;
    border-radius: 12px;
}

.nnweb-access-selector--tutor .nnweb-access-selector__grid {
    grid-template-columns: 1fr;
    gap: 14px;
    padding-top: 10px;
}

.nnweb-access-selector--tutor .nnweb-access-option {
    min-height: 78px;
    padding: 20px 14px;
    align-items: center;
}

.nnweb-access-selector--tutor .nnweb-access-option.has-feature-badge {
    margin-top: 14px;
    padding-top: 26px;
}

.nnweb-access-selector--tutor .nnweb-access-option__aside {
    justify-content: flex-end;
    gap: 4px;
    padding-top: 2px;
}

.nnweb-access-selector--tutor .nnweb-access-option.has-feature-badge .nnweb-access-option__aside {
    padding-top: 6px;
}

.nnweb-access-selector--tutor .nnweb-access-option__feature-badge {
    right: 12px;
    padding: 6px 13px;
}

.nnweb-access-selector--tutor .nnweb-access-option__price {
    font-size: 18px;
}

.nnweb-access-selector--tutor .nnweb-access-option__compare-price {
    font-size: var(--nnweb-plan-compare-font-size, 12px);
}

.tutor-add-to-cart-button {
    margin-top: 16px !important;
    transition: filter 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.nnweb-tutor-pay-now-btn {
    font-weight: 600;
    transition: filter 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.nnweb-tutor-in-cart-notice__text {
    display: block !important;
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.45;
    text-align: center;
    color: #64748b;
}

/* Tutor course layout — desktop (≥1200px) */
@media (min-width: 1200px) {
    body.nnweb-course-has-access-plans .tutor-course-details-page .tutor-row.tutor-gx-xl-5 > main.tutor-col-xl-8 {
        flex: 0 0 48%;
        max-width: 48%;
    }

    body.nnweb-course-has-access-plans .tutor-course-details-page .tutor-row.tutor-gx-xl-5 > aside.tutor-col-xl-4 {
        flex: 0 0 52%;
        max-width: 52%;
    }

    body.nnweb-course-has-access-plans .tutor-course-details-page .tutor-course-thumbnail img {
        max-height: 240px;
        width: 100%;
        object-fit: cover;
    }

    body.nnweb-course-has-access-plans .tutor-single-course-sidebar .tutor-card {
        padding: 18px;
    }
}

body.nnweb-course-has-access-plans .tutor-single-course-sidebar .tutor-course-sidebar-card-pricing,
body.nnweb-course-has-access-plans .tutor-single-course-sidebar .tutor-color-muted {
    display: none !important;
}

body.nnweb-course-has-access-plans .tutor-single-course-sidebar > .tutor-card > .tutor-card-body > div > div:first-child {
    margin-bottom: 0;
}

/* Mobilni telefon — redosled: thumbnail → plaćanje → sadržaj */
@media (max-width: 782px) {
    body.nnweb-course-has-access-plans .tutor-course-details-page .tutor-row.tutor-gx-xl-5,
    body.nnweb-course-product-in-cart .tutor-course-details-page .tutor-row.tutor-gx-xl-5 {
        display: flex;
        flex-direction: column;
    }

    body.nnweb-course-has-access-plans .tutor-course-details-page main.tutor-col-xl-8,
    body.nnweb-course-product-in-cart .tutor-course-details-page main.tutor-col-xl-8 {
        display: contents;
    }

    body.nnweb-course-has-access-plans .tutor-course-details-page main.tutor-col-xl-8 > :not(.tutor-course-details-tab):not(.tutor-mt-32),
    body.nnweb-course-product-in-cart .tutor-course-details-page main.tutor-col-xl-8 > :not(.tutor-course-details-tab):not(.tutor-mt-32) {
        order: 1;
    }

    body.nnweb-course-has-access-plans .tutor-course-details-page main.tutor-col-xl-8 > .tutor-mt-32,
    body.nnweb-course-product-in-cart .tutor-course-details-page main.tutor-col-xl-8 > .tutor-mt-32 {
        order: 2;
        margin-top: 16px !important;
        margin-bottom: 0 !important;
    }

    body.nnweb-course-has-access-plans .tutor-course-details-page .tutor-course-details-tab,
    body.nnweb-course-product-in-cart .tutor-course-details-page .tutor-course-details-tab {
        order: 3;
        margin-top: 24px !important;
    }

    body.nnweb-course-has-access-plans .tutor-course-details-page aside.tutor-col-xl-4,
    body.nnweb-course-product-in-cart .tutor-course-details-page aside.tutor-col-xl-4 {
        order: 2;
        margin-top: 16px !important;
    }

    body.nnweb-course-has-access-plans.nnweb-mobile-enrollment-top .tutor-course-details-page aside.tutor-col-xl-4,
    body.nnweb-course-product-in-cart.nnweb-mobile-enrollment-top .tutor-course-details-page aside.tutor-col-xl-4 {
        order: 4;
        margin-top: 24px !important;
    }

    /* Ukloni dupli Tutor card padding oko bloka za plaćanje */
    body.nnweb-course-has-access-plans .tutor-course-details-page main .tutor-mt-32 > .tutor-card.tutor-sidebar-card,
    body.nnweb-course-has-access-plans .tutor-course-details-page .tutor-single-course-sidebar > .tutor-card.tutor-sidebar-card,
    body.nnweb-course-product-in-cart .tutor-course-details-page main .tutor-mt-32 > .tutor-card.tutor-sidebar-card,
    body.nnweb-course-product-in-cart .tutor-course-details-page .tutor-single-course-sidebar > .tutor-card.tutor-sidebar-card {
        padding: 0 !important;
        border: 0 !important;
        box-shadow: none !important;
        background: transparent !important;
    }

    body.nnweb-course-has-access-plans .tutor-course-details-page main .tutor-mt-32 .tutor-card-body,
    body.nnweb-course-has-access-plans .tutor-course-details-page .tutor-single-course-sidebar > .tutor-card > .tutor-card-body,
    body.nnweb-course-product-in-cart .tutor-course-details-page main .tutor-mt-32 .tutor-card-body,
    body.nnweb-course-product-in-cart .tutor-course-details-page .tutor-single-course-sidebar > .tutor-card > .tutor-card-body {
        padding: 0 !important;
    }

    body.nnweb-course-has-access-plans .tutor-course-details-page main .tutor-mt-32 .tutor-card-footer,
    body.nnweb-course-product-in-cart .tutor-course-details-page main .tutor-mt-32 .tutor-card-footer {
        margin-top: 16px;
        padding: 14px 0 0 !important;
        border-top: 1px solid #e2e8f0;
    }

    body.nnweb-course-has-access-plans .tutor-course-details-page .nnweb-access-selector--tutor,
    body.nnweb-course-product-in-cart .tutor-course-details-page .nnweb-access-selector--tutor {
        margin: 0;
        padding: 14px;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        background: #fff;
        box-shadow: none;
        width: 100%;
        box-sizing: border-box;
    }

    body.nnweb-course-has-access-plans .tutor-course-details-page .nnweb-access-selector--tutor .nnweb-access-selector__grid,
    body.nnweb-course-product-in-cart .tutor-course-details-page .nnweb-access-selector--tutor .nnweb-access-selector__grid {
        gap: 14px;
        padding-top: 0;
    }

    body.nnweb-course-has-access-plans .tutor-course-details-page .nnweb-access-selector--tutor .nnweb-access-option,
    body.nnweb-course-product-in-cart .tutor-course-details-page .nnweb-access-selector--tutor .nnweb-access-option {
        min-height: 0;
        padding: 20px 16px;
        gap: 14px;
        align-items: flex-start;
    }

    body.nnweb-course-has-access-plans .tutor-course-details-page .nnweb-access-selector--tutor .nnweb-access-option.has-feature-badge,
    body.nnweb-course-product-in-cart .tutor-course-details-page .nnweb-access-selector--tutor .nnweb-access-option.has-feature-badge {
        margin-top: 12px;
        padding-top: 26px;
    }

    body.nnweb-course-has-access-plans .tutor-course-details-page .nnweb-access-option__label,
    body.nnweb-course-product-in-cart .tutor-course-details-page .nnweb-access-option__label {
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    body.nnweb-course-has-access-plans .tutor-course-details-page .nnweb-access-option__body,
    body.nnweb-course-product-in-cart .tutor-course-details-page .nnweb-access-option__body {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    body.nnweb-course-has-access-plans .tutor-course-details-page .nnweb-access-option__aside,
    body.nnweb-course-product-in-cart .tutor-course-details-page .nnweb-access-option__aside {
        flex: none;
        width: 100%;
        max-width: 100%;
        align-items: flex-start;
        text-align: left;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px 16px;
        padding-top: 0 !important;
    }

    body.nnweb-course-has-access-plans .tutor-course-details-page .nnweb-access-option__price,
    body.nnweb-course-product-in-cart .tutor-course-details-page .nnweb-access-option__price,
    body.nnweb-course-has-access-plans .tutor-course-details-page .nnweb-access-option__compare-price,
    body.nnweb-course-product-in-cart .tutor-course-details-page .nnweb-access-option__compare-price {
        white-space: normal;
        text-align: left;
        max-width: 100%;
    }

    body.nnweb-course-has-access-plans .tutor-course-details-page .nnweb-access-option__price .woocommerce-Price-amount,
    body.nnweb-course-product-in-cart .tutor-course-details-page .nnweb-access-option__price .woocommerce-Price-amount {
        white-space: normal;
    }

    body.nnweb-course-has-access-plans .tutor-course-details-page .tutor-add-to-cart-button,
    body.nnweb-course-has-access-plans .tutor-course-details-page .nnweb-tutor-pay-now-btn,
    body.nnweb-course-product-in-cart .tutor-course-details-page .tutor-add-to-cart-button,
    body.nnweb-course-product-in-cart .tutor-course-details-page .nnweb-tutor-pay-now-btn {
        margin-top: 16px !important;
    }
}
