/* ------------------------------------------------------------------ *
 * Duration tabs — horizontal scroll, glassmorphism
 * ------------------------------------------------------------------ */

.wpdmm-duration-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 24px;
    padding-bottom: 4px;
    scrollbar-width: thin;
    display: flex;
    justify-content: center;
}

/* justify-content:center clips the start of overflowing flex content on
   mobile (the row can't be scrolled back to its first item) — so once the
   tabs no longer fit their container, switch to left-aligned + scrollable. */
@media (max-width: 640px) {
    .wpdmm-duration-scroll {
        justify-content: flex-start !important;
    }
}

.wpdmm-duration-tabs {
    display: inline-flex;
    gap: 8px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    white-space: nowrap;
}

.wpdmm-duration-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #333;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.wpdmm-duration-tab:hover {
    background: rgba(255, 255, 255, 0.35);
}

.wpdmm-duration-tab.is-active {
    background: linear-gradient(135deg, #2e7d32, #f57c00);
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.wpdmm-duration-badge {
    background: rgba(255, 255, 255, 0.3);
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 11px;
}

.wpdmm-duration-tab.is-active .wpdmm-duration-badge {
    background: rgba(255, 255, 255, 0.25);
}

/* ------------------------------------------------------------------ *
 * Plan cards — horizontal scroll, glassmorphism, green→orange gradient
 * ------------------------------------------------------------------ */

.wpdmm-cards-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding: 8px 4px 20px;
    margin: 0 -4px;
}

.wpdmm-plans {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
}

.wpdmm-plan {
    flex: 0 0 calc((100% - 40px) / 3); /* 3 on desktop */
    scroll-snap-align: start;
    position: relative;
    border-radius: 18px;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    color: #fff;
    overflow: hidden;

    background: linear-gradient(160deg, rgba(46, 125, 50, 0.55), rgba(245, 124, 0, 0.55));
    border: 1px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.wpdmm-plan::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0) 60%);
    pointer-events: none;
}

.wpdmm-plan-current {
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5), 0 8px 32px rgba(0, 0, 0, 0.18);
}

.wpdmm-plan-unavailable {
    opacity: 0.55;
    filter: grayscale(40%);
}

.wpdmm-plan-unavailable .wpdmm-btn {
    cursor: not-allowed;
}

.wpdmm-plan-name {
    margin: 0 0 8px;
    font-size: 19px;
    font-weight: 700;
    position: relative;
}

.wpdmm-plan-price {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 12px;
    position: relative;
}

.wpdmm-plan-interval {
    font-size: 13px;
    font-weight: 400;
    opacity: 0.85;
}

.wpdmm-plan-desc {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 12px;
    position: relative;
}

.wpdmm-plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    flex-grow: 1;
    position: relative;
}

.wpdmm-plan-features li {
    padding: 7px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.3);
    font-size: 14px;
}

.wpdmm-btn {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.95);
    color: #1a1a2e;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    position: relative;
    transition: transform 0.15s ease;
}

.wpdmm-btn:hover { transform: translateY(-2px); }

.wpdmm-current-plan-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.9);
    color: #1a1a2e;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 10px;
}

/* Responsive card counts: 3 desktop / 2 tablet / 1 mobile */
@media (max-width: 1024px) {
    .wpdmm-plan { flex-basis: calc((100% - 20px) / 2); }
}

@media (max-width: 640px) {
    .wpdmm-plan { flex-basis: 88%; }
}

/* ------------------------------------------------------------------ *
 * Notices & status widget (unchanged styling, kept for other shortcodes)
 * ------------------------------------------------------------------ */

.wpdmm-notice {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 14px;
}

.wpdmm-notice-success { background: #e8f5e9; color: #1b5e20; border: 1px solid #a5d6a7; }
.wpdmm-notice-warning { background: #fff8e1; color: #7a5c00; border: 1px solid #ffe082; }
.wpdmm-notice-error   { background: #fdecea; color: #611a15; border: 1px solid #f5c6cb; }

.wpdmm-status {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px 20px;
    background: #fafafa;
}

.wpdmm-status p { margin: 6px 0; }

.wpdmm-owned-notice,
.wpdmm-quota-notice {
    padding: 8px 12px;
    border-radius: 6px;
    background: #f5f5f5;
    font-size: 13px;
    margin-top: 10px;
}

.wpdmm-tier-download .button {
    margin-top: 8px;
}
