/*
 * WC Subscription Addon Manager – My Account Styles
 * v2.1.0
 */

/* ──────────────────────────────────────────────
 *  Confirmation Modal
 * ────────────────────────────────────────────── */

.wcsam-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000;
    align-items: center;
    justify-content: center;
}

.wcsam-modal--visible {
    display: flex;
}

/* Backdrop */
.wcsam-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: wcsam-fadeIn 0.2s ease;
}

/* Dialog container */
.wcsam-modal__dialog {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 14px;
    width: 90%;
    max-width: 440px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    animation: wcsam-slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Header */
.wcsam-modal__header {
    background: #002856;
    color: #fff;
    padding: 24px 28px 20px;
    text-align: center;
}

.wcsam-modal__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    margin-bottom: 12px;
}

.wcsam-modal__icon svg {
    color: #fff;
}

.wcsam-modal__title {
    font-size: 17px;
    font-weight: 600;
    margin: 0;
    color: #fff;
}

/* Body */
.wcsam-modal__body {
    padding: 24px 28px 20px;
}

.wcsam-modal__product-name {
    font-size: 16px;
    font-weight: 600;
    color: #000;
    margin: 0 0 16px 0;
    text-align: center;
}

.wcsam-modal__details {
    background: #f8f9fb;
    border: 1px solid #e8ecf1;
    padding: 4px 0;
    margin-bottom: 16px;
}

.wcsam-modal__detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
}

.wcsam-modal__detail-row+.wcsam-modal__detail-row {
    border-top: 1px solid #e8ecf1;
}

.wcsam-modal__detail-label {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.wcsam-modal__detail-value {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
}

/* Strip inner per-cycle label from displayed price */
.wcsam-modal__price .wcsam-addon-card__per-cycle {
    display: none;
}

/* Proration note */
.wcsam-modal__proration-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: #fef9e7;
    border: 1px solid #f7dc6f;
    padding: 12px 14px;
    font-size: 12.5px;
    line-height: 1.55;
    color: #6e5a00;
}

.wcsam-modal__proration-note svg {
    flex-shrink: 0;
    margin-top: 1px;
    color: #d4a800;
}

/* Footer */
.wcsam-modal__footer {
    display: flex;
    gap: 10px;
    padding: 0 28px 24px;
    justify-content: flex-end;
}

.wcsam-modal__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    text-transform: uppercase;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
    line-height: 1.4;
}

.wcsam-modal__btn--cancel {
    background: #A32035;
    color: #fff;
}

.wcsam-modal__btn--cancel:hover {
    background: #CC0000;
}

.wcsam-modal__btn--confirm {
    background: #002856;
    color: #fff;
}

.wcsam-modal__btn--confirm:hover {
    background: #A32035;
}

.wcsam-modal__btn--confirm:active {
    background: #A32035;
}

/* Animations */
@keyframes wcsam-fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes wcsam-slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ──────────────────────────────────────────────
 *  Page Layout
 * ────────────────────────────────────────────── */

.wcsam-addons-page {
    margin-top: 20px;
}

.wcsam-addons-page__header {
    margin-bottom: 30px;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 15px;
}
.wcsam-addons-page__subtitle {
    color: #424242;
    font-size: 17px;
    margin: 0;
    line-height: 1.5;
}

/* ──────────────────────────────────────────────
 *  Subscription Card
 * ────────────────────────────────────────────── */

.wcsam-subscription-card {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.wcsam-subscription-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 15px;
}

.wcsam-subscription-card__plan-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.wcsam-subscription-card__plan-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: #f0f7ff;
    color: #002856;
    border-radius: 50%;
    flex-shrink: 0;
}

.wcsam-subscription-card__plan-name {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 600;
    color: #002856;
}

.wcsam-subscription-card__plan-meta {
    font-size: 14px;
    color: #424242;
    display: flex;
    gap: 10px;
    align-items: center;
}

.wcsam-subscription-card__cycle-badge {
    background: #f0f0f1;
    padding: 2px 8px;
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    color: #424242;
}

/* ──────────────────────────────────────────────
 *  Status Area
 * ────────────────────────────────────────────── */

.wcsam-subscription-card__status-area {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.wcsam-status-badge {
    display: inline-block;
        padding: 8px 25px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1;
}

.wcsam-status-badge--active {
    background: #008000;
    color: #fff;
}

.wcsam-status-badge--on-hold {
    background: #f8dda7;
    color: #94660c;
}

.wcsam-status-badge--cancelled {
    background: #e5e5e5;
    color: #777;
}

.wcsam-status-badge--pending-cancel {
    background: #f8dda7;
    color: #94660c;
}

.wcsam-subscription-card__next-payment {
    font-size: 12px;
    color: #333;
}

/* ──────────────────────────────────────────────
 *  Renewal Pricing Summary
 * ────────────────────────────────────────────── */

.wcsam-renewal-summary {
    background: #f8f9fb;
    border: 1px solid #e8ecf1;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 25px;
}

.wcsam-renewal-summary__breakdown {
    margin-bottom: 12px;
}

.wcsam-renewal-summary__line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    font-size: 14px;
    color: #424242;
}

.wcsam-renewal-summary__line--addon {
    color: #424242;
    font-size: 14px;
    line-height: normal;
}

.wcsam-renewal-summary__label {
    font-weight: 500;
    line-height: normal;
}

.wcsam-renewal-summary__amount {
    font-weight: 600;
    color: #424242;
}

.wcsam-renewal-summary__total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 2px solid #dde3ea;
}

.wcsam-renewal-summary__total-label {
    font-size: 14px;
    font-weight: 700;
    color: #23282d;
    line-height: normal;
}

.wcsam-renewal-summary__total-amount {
    font-size: 17px;
    font-weight: 600;
    color: #002856;
}

.wcsam-renewal-summary__total-amount small {
    font-size: 13px;
    font-weight: 500;
    color: #333;
}

/* ──────────────────────────────────────────────
 *  Section Labels & Badges
 * ────────────────────────────────────────────── */

.wcsam-section-label {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #002856;
}

.wcsam-count-badge {
    background: #e0e0e0;
    color: #555;
    font-size: 10px;
    padding: 1px 10px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    display: inline-block;
}

.wcsam-count-badge--pending {
    background: #fff8e1;
    color: #f57f17;
    border: 1px solid #ffe082;
}

/* ──────────────────────────────────────────────
 *  Active Add-ons List
 * ────────────────────────────────────────────── */

.wcsam-active-addons {
    margin-bottom: 30px;
}

.wcsam-active-addons__list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.wcsam-active-addon-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    transition: background-color 0.2s;
}

.wcsam-active-addon-chip:hover {
    background: #f0f0f0;
}

.wcsam-active-addon-chip__check {
    color: #46b450;
    font-weight: bold;
}

.wcsam-active-addon-chip__name {
    font-weight: 500;
}

.wcsam-active-addon-chip__price {
    font-weight: 600;
    color: #333;
    opacity: 0.8;
}

.wcsam-active-addon-chip__date {
    font-size: 11px;
    color: #999;
    border-left: 1px solid #ddd;
    padding-left: 8px;
    margin-left: 4px;
}

/* ──────────────────────────────────────────────
 *  Pending Add-ons Grid (Available Add-ons)
 * ────────────────────────────────────────────── */

.wcsam-pending-addons__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.wcsam-addon-card {
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    background: #fff;
}

.wcsam-addon-card__icon_placeholder {
    width: 48px;
    height: 48px;
    background: #f4f6f8;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    overflow: hidden;
}

.wcsam-addon-card__icon_placeholder img.wcsam-addon-card__thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.wcsam-addon-card__body {
    flex-grow: 1;
    margin-bottom: 20px;
}

.wcsam-addon-card__name {
    font-size: 16px;
    margin: 0 0 8px 0;
    color: #1d2327;
    font-weight: 600;
}

.wcsam-addon-card__desc {
    font-size: 13px;
    color: #646970;
    margin-bottom: 10px;
    line-height: 1.5;
}
.wcsam-addons-page__title{
    font-size: 24px;
    color: #002856;
    font-weight: 600;
}
.wcsam-addon-card__price {
    font-size: 17px;
    font-weight: 600;
    color: #A32035;
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 8px;
}

.wcsam-addon-card__per-cycle {
    font-size: 12px;
    color: #888;
    font-weight: 400;
}

.wcsam-addon-card__proration-hint {
    font-size: 12px;
    color: #424242;
    margin: 0;
    line-height: 1.4;
}

.wcsam-addon-card__footer {
    display: flex;
    justify-content: flex-end;
}

.wcsam-addon-card__footer form {
    margin: 0;
}

/* ──────────────────────────────────────────────
 *  Buttons
 * ────────────────────────────────────────────── */

.wcsam-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none !important;
    transition: all 0.2s;
    cursor: pointer;
    line-height: normal;
    border: none;
    font-family: 'Montserrat', sans-serif;
}

.wcsam-btn--primary {
    background: #0B396C;
    color: #fff !important;
    border: 1px solid #0B396C;
}

.wcsam-btn--primary:hover {
    background: #A32035;
    border-color: #A32035;
}

.wcsam-btn--loading {
    opacity: 0.7;
    pointer-events: none;
    cursor: wait;
}

/* ──────────────────────────────────────────────
 *  Empty & All-Active States
 * ────────────────────────────────────────────── */

.wcsam-empty-state {
    text-align: center;
    padding: 40px 20px;
    background: #f9f9f9;
    border-radius: 8px;
    color: #666;
}

.wcsam-empty-state svg {
    margin-bottom: 15px;
    color: #d1d1d1;
}

.wcsam-all-active-state {
    text-align: center;
    padding: 40px 20px;
    color: #46b450;
}

/* ──────────────────────────────────────────────
 *  Subscription View – Merged Add-ons Note
 * ────────────────────────────────────────────── */

.wcsam-subscription-addons-note {
    margin-top: 30px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #f8f9fa;
}

.wcsam-subscription-addons-note__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #002856;
}

.wcsam-subscription-addons-note__desc {
    font-size: 14px;
    color: #424242;
    margin-bottom: 15px;
    line-height: 1.5;
}

.wcsam-subscription-addons-note__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.wcsam-subscription-addons-note__table thead th {
    text-align: left;
    padding: 8px 12px;
    font-weight: 600;
    color: #002856 !important;
    font-size: 14px;
}

.wcsam-subscription-addons-note__table tbody td {
    padding: 8px 12px;
    border-bottom: 1px solid #e8f0f8;
}

.wcsam-subscription-addons-note__table tbody tr:last-child td {
    border-bottom: none;
}

/* ──────────────────────────────────────────────
 *  Proration Note in Cart
 * ────────────────────────────────────────────── */

.wcsam-proration-note {
    color: #666;
    font-style: italic;
    font-size: 12px;
}

/* ──────────────────────────────────────────────
 *  Responsive
 * ────────────────────────────────────────────── */

@media (max-width: 768px) {
    .wcsam-subscription-card__header {
        flex-direction: column;
        align-items: stretch;
    }

    .wcsam-subscription-card__status-area {
        align-items: flex-start;
        text-align: left;
    }

    .wcsam-pending-addons__grid {
        grid-template-columns: 1fr;
    }

    .wcsam-subscription-addons-note__table {
        font-size: 12px;
    }

    .wcsam-subscription-addons-note__table thead th,
    .wcsam-subscription-addons-note__table tbody td {
        padding: 6px 8px;
    }

    .wcsam-renewal-summary {
        padding: 12px 14px;
    }

    .wcsam-renewal-summary__total-amount {
        font-size: 16px;
    }
    .wcsam-btn{    padding: 10px 25px;}
}