/* =========================================================
   AMS Public Styles — Motors Theme
   Primary : #f15a29 (orange)   Secondary : #13235b (dark navy)
========================================================= */

/* ---- Pricing Table Layout ---- */
.ams-pricing-table {
    font-family: Montserrat, Arial, sans-serif;
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

/* ---- Billing Toggle ---- */
.ams-billing-toggle {
    display: flex !important;
    justify-content: center;
    align-items: center;
    margin-bottom: 44px;
}
.ams-toggle-btn {
    display: inline-block !important;
    width: auto !important;
    background: #f5f5f5 !important;
    border: 2px solid #ddd !important;
    padding: 11px 36px !important;
    cursor: pointer;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #555 !important;
    letter-spacing: .5px;
    transition: all .2s;
    line-height: 1.4 !important;
    box-shadow: none !important;
    text-transform: uppercase;
}
.ams-toggle-btn:first-child {
    border-radius: 30px 0 0 30px !important;
    border-right: none !important;
}
.ams-toggle-btn:last-child {
    border-radius: 0 30px 30px 0 !important;
    border-left: none !important;
}
.ams-toggle-btn.active {
    background: #f15a29 !important;
    color: #fff !important;
    border-color: #f15a29 !important;
}
.ams-toggle-btn:hover:not(.active) {
    background: #ebebeb !important;
    color: #333 !important;
}

/* ---- Plans Grid ---- */
.ams-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 28px;
    align-items: stretch;
}

/* ---- Plan Card ---- */
.ams-plan-card {
    position: relative;
    border: 2px solid #e8e8e8;
    border-radius: 16px;
    padding: 36px 26px 28px;
    text-align: center;
    background: #fff;
    transition: transform .25s, box-shadow .25s;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 12px rgba(0,0,0,.05);
}
.ams-plan-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 40px rgba(0,0,0,.1);
}
.ams-plan-card.ams-popular {
    border-color: #f15a29;
    box-shadow: 0 8px 32px rgba(241,90,41,.2);
}
.ams-plan-card.ams-current-plan {
    border-color: #13235b;
    box-shadow: 0 8px 32px rgba(19,35,91,.15);
}

/* ---- Badges ---- */
.ams-popular-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: #f15a29;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 18px;
    border-radius: 20px;
    white-space: nowrap;
    letter-spacing: .6px;
    text-transform: uppercase;
}
.ams-current-badge {
    position: absolute;
    top: -15px;
    right: 18px;
    background: #13235b;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    white-space: nowrap;
    letter-spacing: .4px;
}

/* ---- Plan Name & Price ---- */
.ams-plan-name {
    font-size: 18px;
    font-weight: 800;
    color: #13235b;
    margin: 8px 0 18px;
    text-transform: uppercase;
    letter-spacing: .8px;
}
.ams-plan-price {
    margin: 0 0 10px;
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.ams-plan-price strong {
    font-size: 34px;
    font-weight: 800;
    color: #f15a29;
    line-height: 1.1;
}
.ams-price-period {
    font-size: 13px;
    color: #aaa;
    margin-top: 2px;
    display: block;
}
.ams-plan-description {
    color: #999;
    font-size: 13px;
    min-height: 34px;
    margin-bottom: 18px;
    line-height: 1.5;
}

/* ---- Feature List ---- */
.ams-plan-features {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 26px !important;
    text-align: left;
    flex: 1;
}
.ams-plan-features li {
    padding: 9px 0 !important;
    font-size: 14px !important;
    color: #444 !important;
    border-bottom: 1px solid #f2f2f2 !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 10px;
    line-height: 1.4 !important;
    background: none !important;
}
.ams-plan-features li:last-child { border-bottom: none !important; }
.ams-plan-features li::before {
    display: none !important;
    content: none !important;
}
.ams-feat-icon {
    color: #f15a29 !important;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
    line-height: 1;
}
.ams-feat-icon--no {
    color: #ccc !important;
}

/* ---- Buttons ---- */
.ams-btn {
    display: inline-block !important;
    padding: 13px 24px !important;
    border-radius: 6px !important;
    border: 2px solid #f15a29 !important;
    color: #f15a29 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    background: #fff !important;
    transition: all .2s;
    font-family: Montserrat, Arial, sans-serif !important;
    letter-spacing: .3px;
    line-height: 1.4 !important;
    box-shadow: none !important;
    text-transform: none !important;
}
.ams-btn:hover {
    background: #f15a29 !important;
    color: #fff !important;
    text-decoration: none !important;
}
.ams-btn-block {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    box-sizing: border-box;
}
.ams-btn-primary {
    background: #f15a29 !important;
    color: #fff !important;
    border-color: #f15a29 !important;
}
.ams-btn-primary:hover {
    background: #d44a1e !important;
    border-color: #d44a1e !important;
    color: #fff !important;
}
.ams-btn-downgrade {
    background: #f7f7f7 !important;
    color: #888 !important;
    border-color: #ddd !important;
    font-weight: 600 !important;
}
.ams-btn-downgrade:hover {
    background: #eee !important;
    border-color: #bbb !important;
    color: #555 !important;
}
.ams-btn-danger {
    background: #dc3545 !important;
    color: #fff !important;
    border-color: #dc3545 !important;
}
.ams-btn-danger:hover {
    background: #c82333 !important;
    border-color: #c82333 !important;
    color: #fff !important;
}
.ams-btn-disabled {
    opacity: 1 !important;
    cursor: default !important;
    background: #13235b !important;
    color: #fff !important;
    border-color: #13235b !important;
    pointer-events: none;
}

/* ---- Upgrade CTA (access gate) ---- */
.ams-upgrade-cta {
    background: linear-gradient(135deg, #13235b 0%, #1e3c87 100%);
    border-radius: 14px;
    padding: 40px 28px;
    margin: 28px 0;
    text-align: center;
    color: #fff;
}
.ams-upgrade-cta-inner {
    max-width: 500px;
    margin: 0 auto;
}
.ams-upgrade-cta h3 {
    margin-top: 0;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
}
.ams-upgrade-cta p {
    color: rgba(255,255,255,.85);
    font-size: 15px;
    margin-bottom: 16px;
}
.ams-upgrade-benefits {
    list-style: none;
    display: block;
    text-align: left;
    padding: 0;
    margin: 10px 0 26px;
}
.ams-upgrade-benefits li {
    padding: 5px 0 5px 26px;
    position: relative;
    color: rgba(255,255,255,.9);
    font-size: 14px;
}
.ams-upgrade-benefits li::before {
    content: "★";
    color: #f15a29;
    position: absolute;
    left: 0;
    font-size: 13px;
}
.ams-btn-secondary {
    background: #fff !important;
    color: #13235b !important;
    border-color: #fff !important;
}
.ams-btn-secondary:hover {
    background: rgba(255,255,255,.15) !important;
    color: #fff !important;
}
.ams-cta-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 4px;
}
.ams-upgrade-cta .ams-btn-primary {
    background: #f15a29;
    border-color: #f15a29;
    padding: 14px 40px;
    font-size: 15px;
    border-radius: 6px;
}
.ams-upgrade-cta .ams-btn-primary:hover {
    background: #d44a1e;
    border-color: #d44a1e;
    color: #fff;
}

/* ---- Notice (success / info) ---- */
.ams-notice {
    padding: 14px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 14px;
    line-height: 1.6;
    border-left: 4px solid;
}
.ams-notice-success {
    background: #f0fdf4;
    border-color: #22c55e;
    color: #166534;
}
.ams-notice strong { font-weight: 700; margin-right: 6px; }

/* ---- Pending badge & button ---- */
.ams-pending-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: #f59e0b;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    white-space: nowrap;
    letter-spacing: .4px;
    text-transform: uppercase;
}
.ams-btn-pending {
    background: #fffbeb !important;
    color: #92400e !important;
    border-color: #f59e0b !important;
    cursor: default !important;
    pointer-events: none;
    font-size: 13px !important;
}

/* ── Downgrade Request Modal ─────────────────────────────────────────── */
.ams-modal-wrap {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 999999;
    display: none;          /* JS sets display:flex to open */
    align-items: center;
    justify-content: center;
}
.ams-modal-overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, .55);
}
.ams-modal-box {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 36px 40px 32px;
    max-width: 500px;
    width: calc(100% - 40px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
    animation: amsModalIn .2s ease;
    max-height: 90vh;
    overflow-y: auto;
}
@keyframes amsModalIn {
    from { transform: scale(.94) translateY(10px); opacity: 0; }
    to   { transform: scale(1)   translateY(0);    opacity: 1; }
}
.ams-modal-close {
    position: absolute !important;
    top: 14px !important;
    right: 16px !important;
    background: none !important;
    border: none !important;
    font-size: 22px !important;
    color: #aaa !important;
    cursor: pointer !important;
    line-height: 1 !important;
    padding: 4px 8px !important;
    width: auto !important;
}
.ams-modal-close:hover { color: #555 !important; }
.ams-modal-header { text-align: center; margin-bottom: 24px; }
.ams-modal-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #13235b, #1e3c87);
    color: #fff;
    font-size: 24px;
    border-radius: 50%;
    margin-bottom: 12px;
}
.ams-modal-header h3 {
    font-size: 20px !important;
    font-weight: 800 !important;
    color: #13235b !important;
    margin: 0 0 6px !important;
}
.ams-modal-header p {
    font-size: 14px;
    color: #666;
    margin: 0;
    line-height: 1.5;
}
.ams-modal-form .ams-form-group { margin-bottom: 18px; }
.ams-modal-form label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #333;
    margin-bottom: 6px;
}
.ams-required { color: #f15a29; }
.ams-modal-form select,
.ams-modal-form textarea {
    width: 100% !important;
    padding: 10px 14px !important;
    border: 2px solid #e8e8e8 !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    color: #333 !important;
    background: #fafafa !important;
    box-sizing: border-box;
    font-family: inherit !important;
    transition: border-color .2s;
    appearance: auto;
}
.ams-modal-form select:focus,
.ams-modal-form textarea:focus {
    border-color: #f15a29 !important;
    outline: none !important;
    background: #fff !important;
}
.ams-modal-form textarea { resize: vertical; min-height: 80px; }
.ams-modal-notice {
    background: #f0f4ff;
    border: 1px solid #c7d4f8;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    color: #374151;
    line-height: 1.5;
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.ams-modal-notice-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; color: #13235b; }
.ams-modal-actions {
    display: flex;
    gap: 12px;
}
.ams-modal-actions .ams-btn { flex: 1; justify-content: center; }

/* ---- My Subscription ---- */
.ams-my-subscription {
    max-width: 640px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 14px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0,0,0,.05);
}
.ams-my-subscription h2 {
    margin-top: 0;
    color: #13235b;
    font-size: 22px;
    font-weight: 700;
    border-bottom: 3px solid #f15a29;
    padding-bottom: 12px;
    margin-bottom: 22px;
}
.ams-subscription-info p {
    margin: 10px 0;
    font-size: 15px;
    color: #444;
}
.ams-subscription-info strong { color: #13235b; }
.ams-subscription-actions {
    margin-top: 26px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ---- Checkout ---- */
.ams-checkout-container {
    max-width: 500px;
    margin: 60px auto;
    padding: 36px;
    border: 1px solid #e8e8e8;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 24px rgba(0,0,0,.08);
}

/* ---- Responsive ---- */
@media (max-width: 767px) {
    .ams-plans-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }
    .ams-plan-price strong { font-size: 28px; }
    .ams-toggle-btn { padding: 10px 20px !important; font-size: 13px !important; }
}
