/* MapleStack Pricing Page v3.0.0 — Standalone */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    width: 100%; min-height: 100%;
    margin: 0; padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 20px;
}

/* ── Header ── */
.ms-pricing-header {
    text-align: center;
    margin-bottom: 40px;
}

.ms-pricing-header h1 {
    font-size: 36px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.ms-pricing-header p {
    font-size: 16px;
    color: rgba(255,255,255,.85);
    max-width: 500px;
    margin: 0 auto;
}

/* ── Billing Toggle ── */
.ms-billing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}

.ms-billing-toggle span {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,.7);
    transition: color .2s;
}
.ms-billing-toggle span.active {
    color: #fff;
}

.ms-toggle-switch {
    position: relative;
    width: 52px;
    height: 28px;
    background: rgba(255,255,255,.3);
    border-radius: 14px;
    cursor: pointer;
    transition: background .2s;
    border: none;
    padding: 0;
}
.ms-toggle-switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.ms-toggle-switch.yearly::after {
    transform: translateX(24px);
}
.ms-toggle-switch.yearly {
    background: rgba(255,255,255,.5);
}

.ms-save-badge {
    display: inline-block;
    background: #fbbf24;
    color: #78350f;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 4px;
}

/* ── Cards Container ── */
.ms-pricing-cards {
    display: flex;
    gap: 24px;
    max-width: 760px;
    width: 100%;
    align-items: stretch;
}

/* ── Card ── */
.ms-pricing-card {
    flex: 1;
    background: #fff;
    border-radius: 16px;
    padding: 32px 28px;
    box-shadow: 0 8px 32px rgba(0,0,0,.12);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform .2s, box-shadow .2s;
}
.ms-pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,.18);
}

.ms-pricing-card.featured {
    border: 2.5px solid #667eea;
    box-shadow: 0 8px 32px rgba(102,126,234,.25);
}

.ms-card-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 16px;
    border-radius: 12px;
    white-space: nowrap;
}

.ms-card-name {
    font-size: 20px;
    font-weight: 700;
    color: #111;
    margin-bottom: 4px;
}

.ms-card-desc {
    font-size: 13px;
    color: #888;
    margin-bottom: 20px;
}

.ms-card-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 4px;
}

.ms-card-price .amount {
    font-size: 42px;
    font-weight: 800;
    color: #111;
    line-height: 1;
}

.ms-card-price .currency {
    font-size: 18px;
    font-weight: 600;
    color: #555;
}

.ms-card-price .period {
    font-size: 14px;
    color: #888;
}

.ms-card-price-note {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 24px;
    min-height: 18px;
}

/* ── Features List ── */
.ms-card-features {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
    flex: 1;
}

.ms-card-features li {
    padding: 6px 0;
    font-size: 14px;
    color: #444;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
}

.ms-card-features li::before {
    content: "✓";
    font-weight: 700;
    color: #46b450;
    flex-shrink: 0;
    margin-top: 1px;
}

.ms-card-features li.disabled {
    color: #bbb;
    text-decoration: line-through;
}
.ms-card-features li.disabled::before {
    content: "✗";
    color: #ddd;
}

/* ── Buttons ── */
.ms-card-btn {
    display: block;
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s, transform .15s;
    text-align: center;
    line-height: 48px;
    text-decoration: none;
}

.ms-card-btn.primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}
.ms-card-btn.primary:hover { opacity: .9; transform: translateY(-1px); }

.ms-card-btn.secondary {
    background: #f3f4f6;
    color: #555;
    border: 1.5px solid #e5e7eb;
}
.ms-card-btn.secondary:hover { background: #e5e7eb; }

.ms-card-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.ms-card-btn.loading {
    color: transparent !important;
    position: relative;
    pointer-events: none;
}
.ms-card-btn.loading::after {
    content: "";
    position: absolute;
    top: 50%; left: 50%;
    width: 22px; height: 22px;
    margin: -11px 0 0 -11px;
    border: 3px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ms-spin .7s linear infinite;
}
@keyframes ms-spin { to { transform: rotate(360deg); } }

/* ── Result Messages ── */
.ms-pricing-result {
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    max-width: 760px;
    width: 100%;
    text-align: center;
}
.ms-pricing-result.success { background: rgba(240,253,244,.95); border: 1px solid #86efac; color: #166534; }
.ms-pricing-result.error { background: rgba(254,242,242,.95); border: 1px solid #fca5a5; color: #991b1b; }
.ms-pricing-result.info { background: rgba(239,246,255,.95); border: 1px solid #93c5fd; color: #1e40af; }

/* ── Checkout Success/Cancel Overlay ── */
.ms-checkout-result {
    max-width: 480px;
    width: 100%;
    background: #fff;
    border-radius: 16px;
    padding: 48px 32px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,.12);
}
.ms-checkout-result .icon { font-size: 48px; margin-bottom: 16px; }
.ms-checkout-result h2 { font-size: 24px; font-weight: 700; color: #111; margin-bottom: 8px; }
.ms-checkout-result p { font-size: 15px; color: #666; margin-bottom: 24px; line-height: 1.5; }
.ms-checkout-result a.ms-card-btn { display: inline-block; width: auto; padding: 0 32px; }

/* ── Footer ── */
.ms-pricing-footer {
    margin-top: 32px;
    text-align: center;
    font-size: 13px;
    color: rgba(255,255,255,.6);
}
.ms-pricing-footer a {
    color: rgba(255,255,255,.8);
    text-decoration: none;
}
.ms-pricing-footer a:hover { text-decoration: underline; }

/* ── Responsive ── */
@media (max-width: 640px) {
    .ms-pricing-cards { flex-direction: column; }
    .ms-pricing-header h1 { font-size: 28px; }
    .ms-pricing-card { padding: 28px 24px; }
    .ms-card-price .amount { font-size: 36px; }
    body { padding: 24px 16px; }
}
