/* ── CCS Subscription Frontend Styles ─────────────────────────────────────── */

/* Status badges */
.ccs-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .3px;
    text-transform: uppercase;
}

.ccs-status--active {
    background: #d4edda;
    color: #155724;
}

.ccs-status--pending {
    background: #fff3cd;
    color: #856404;
}

.ccs-status--grace {
    background: #ffe5b4;
    color: #7a4a00;
}

.ccs-status--cancelled {
    background: #f8d7da;
    color: #721c24;
}

.ccs-status--paused {
    background: #cce5ff;
    color: #004085;
}

.ccs-status--inactive {
    background: #e2e3e5;
    color: #383d41;
}

.ccs-status--complete {
    background: #d4edda;
    color: #155724;
}

.ccs-status--failed {
    background: #f8d7da;
    color: #721c24;
}

/* Notices */
.ccs-notice {
    padding: 12px 16px;
    border-radius: 6px;
    background: #f8f9fa;
    border-left: 4px solid #6c757d;
    margin: 12px 0;
}

.ccs-notice--warning {
    background: #fffbee;
    border-color: #f0ad4e;
    color: #7a4a00;
}

.ccs-notice--error {
    background: #fff5f5;
    border-color: #e74c3c;
    color: #721c24;
}

/* ── Plans grid ─────────────────────────────────────────────────────────────── */
.ccs-plans__heading {
    margin-bottom: 75px;
    text-align: center;
    color: #006566;
    font-family: "Montserrat", Montserrat;
    font-size: 32px;
    font-weight: 600;
    text-transform: none;
    line-height: 1.2em;
}

.ccs-plans__profession {
    text-align: center;
    font-size: 13px;
    color: #666;
    margin: 0 0 32px;
}

.ccs-plans__profession strong {
    color: #1a6563;
    text-transform: capitalize;
}

.ccs-plans__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    margin-bottom: 40px;
    align-items: start;
}

/* ── Plan card shell ─────────────────────────────────────────────────────────── */
.ccs-plan-card {
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 24px rgba(0, 0, 0, .10);
    display: flex;
    flex-direction: column;
    transition: transform .2s, box-shadow .2s;
}

.ccs-plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 36px rgba(0, 0, 0, .14);
}

.ccs-plan-card--recommended {
    position: relative;
    transform: scale(1.05);
    box-shadow: 0 10px 40px rgba(26, 101, 99, .22);
    z-index: 1;
}

.ccs-plan-card--recommended:hover {
    transform: scale(1.05) translateY(-4px);
    box-shadow: 0 16px 48px rgba(26, 101, 99, .28);
}

/* ── Card header (dark) ──────────────────────────────────────────────────────── */
.ccs-plan-card__header {
    background: #1b6563;
    color: #fff;
    padding: 32px 28px 28px;
    text-align: center;
    position: relative;
}

/* Diagonal ribbon badge */
.ccs-plan-card__badge {
    position: absolute;
    top: 22px;
    right: -36px;
    width: 160px;
    background: #FED84D;
    color: #1a6563;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    text-align: center;
    padding: 6px 0;
    transform: rotate(45deg);
    transform-origin: center center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
}

.ccs-plan-card__name {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 14px;
    color: #fff;
}

.ccs-plan-card__billing-note {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    color: #1b6563;
    background: #FED84D;
    border-radius: 20px;
    padding: 3px 12px;
    margin: 0 0 14px;
    letter-spacing: .01em;
}

.ccs-plan-card__desc {
    font-size: 14px;
    color: rgba(255, 255, 255, .82);
    line-height: 1.6;
    margin: 0;
}

.ccs-plan-card__eligibility {
    font-size: 12px;
    color: rgba(255, 255, 255, .6);
    line-height: 1.5;
    margin: 10px 0 0;
    font-style: italic;
    border-top: 1px solid rgba(255, 255, 255, .15);
    padding-top: 10px;
}

/* ── Card body (white) ───────────────────────────────────────────────────────── */
.ccs-plan-card__body {
    padding: 28px 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
}

/* ── Price block ─────────────────────────────────────────────────────────────── */
.ccs-plan-card__price-wrap {
    text-align: center;
    margin-bottom: 20px;
}

.ccs-plan-card__price {
    margin: 0;
    line-height: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 4px;
}

.ccs-plan-card__currency {
    font-size: 14px;
    font-weight: 700;
    color: #555;
    margin-top: 10px;
}

.ccs-plan-card__amount {
    font-size: 58px;
    font-weight: 800;
    color: #1b6563;
    letter-spacing: -2px;
    line-height: 1;
    transition: opacity .2s ease, transform .2s ease;
}

.ccs-plan-card__amount.is-updating {
    opacity: 0;
    transform: translateY(-4px);
}

.ccs-plan-card__freq {
    font-size: 13px;
    color: #888;
    margin: 6px 0 0;
    text-align: center;
}

.ccs-plan-card__trial {
    font-size: 13px;
    font-weight: 600;
    color: #1a6563;
    background: #e6f7f5;
    border-radius: 20px;
    padding: 4px 12px;
    margin: 0 0 16px;
    display: inline-block;
    align-self: center;
}

.ccs-plan-card__trial-used {
    font-size: 12px;
    color: #999;
    background: #f5f5f5;
    border-radius: 20px;
    padding: 4px 12px;
    margin: 0 0 16px;
    display: inline-block;
    align-self: center;
    font-style: italic;
}

/* ── Eligibility section (body) ──────────────────────────────────────────────── */
.ccs-plan-card__eligibility-section {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: #f0faf9;
    border: 1px solid #b2deda;
    border-radius: 8px;
    padding: 12px 14px;
    margin: 0 0 16px;
}

.ccs-plan-card__eligibility-section::before {
    content: '✓';
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    background: #1a6563;
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.ccs-plan-card__eligibility-heading {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #1a6563;
    margin: 0 0 3px;
    line-height: 1;
}

.ccs-plan-card__eligibility-body {
    font-size: 12.5px;
    color: #2c5f5e;
    line-height: 1.5;
    margin: 0;
}

.ccs-plan-card__eligibility-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* ── Features list ───────────────────────────────────────────────────────────── */
.ccs-plan-card__features {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    flex: 1;
}

.ccs-plan-card__features li {
    font-size: 14px;
    color: #333;
    padding: 13px 0 13px 36px;
    position: relative;
    border-bottom: 1px solid #efefef;
}

.ccs-plan-card__features li:first-child {
    border-top: 1px solid #efefef;
}

.ccs-plan-card__features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border: 2px solid #1a6563;
    border-radius: 50%;
    box-sizing: border-box;
}

.ccs-plan-card__features li::after {
    content: '';
    position: absolute;
    left: 8px;
    top: 48%;
    transform: translateY(-60%) rotate(45deg);
    width: 5px;
    height: 9px;
    border-right: 2px solid #1a6563;
    border-bottom: 2px solid #1a6563;
}

.ccs-growth-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
}

.ccs-growth-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.ccs-growth-single-option {
    font-size: 14px;
    font-weight: 600;
    color: #1a6563;
    background: #f0faf9;
    border: 1px solid #b2deda;
    border-radius: 8px;
    padding: 10px 14px;
    margin: 0 0 8px;
    text-align: center;
}

/* ── Buttons ─────────────────────────────────────────────────────────────────── */
.ccs-btn {
    display: inline-block;
    padding: 10px 22px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background .2s, opacity .2s;
    text-align: center;
}

.ccs-btn--primary {
    background: #FED84D !important;
    color: #1a6563 !important;
    width: 100%;
    margin-top: auto;
}

.ccs-btn--primary:hover,
.ccs-btn--primary:active,
.ccs-btn--primary:focus {
    background: #FED84D !important;
    color: #1a6563 !important;
}

.ccs-btn--secondary {
    background: #fbd84e !important;
    color: #1b6563 !important;
    border: none;
}

.ccs-btn--secondary:hover,
.ccs-btn--secondary:active,
.ccs-btn--secondary:focus {
    background: #fbd84e !important;
    color: #1b6563 !important;
}

/* ── Summary card ────────────────────────────────────────────────────────────── */

.ccs-summary-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.ccs-summary-card__info {
    flex: 1;
    min-width: 200px;
}

.ccs-summary-card__plan {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #2c3e50;
}

.ccs-summary-card__meta {
    font-size: 14px;
    color: #666;
    margin: 0 0 10px;
}

.ccs-summary-card__billing {
    font-size: 14px;
    color: #444;
    margin: 10px 0 0;
}

/* ── Plan features list (my-subscription page) ───────────────────────────── */
.ccs-plan-features {
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
}

.ccs-plan-features__item {
    font-size: 14px;
    color: #444;
    padding: 4px 0 4px 22px;
    position: relative;
}

.ccs-plan-features__item::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: 700;
}

.ccs-summary-card__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 160px;
}

/* ── Payment table ───────────────────────────────────────────────────────────── */
.ccs-payment-history__heading {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #2c3e50;
}

.ccs-table-wrap {
    overflow-x: auto;
}

.ccs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.ccs-table th {
    background: #f4f6f8;
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #ddd;
    white-space: nowrap;
}

.ccs-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
    color: #444;
}

.ccs-table tr:hover td {
    background: #fafafa;
}

.ccs-table code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
}

/* ── Pagination ──────────────────────────────────────────────────────────────── */
.ccs-pagination {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.ccs-pagination__btn {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background: #fff;
    color: #2c3e50;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: background .15s;
}

.ccs-pagination__btn:hover,
.ccs-pagination__btn.is-active {
    background: #2c3e50;
    color: #fff;
    border-color: #2c3e50;
}

/* ── Admin badge reuse ───────────────────────────────────────────────────────── */
#wpcontent .ccs-status {
    font-size: 11px;
}

/* ── Current-plan highlight ──────────────────────────────────────────────────── */
.ccs-plan-card--current {
    box-shadow: 0 0 0 3px #1a6563, 0 10px 36px rgba(26, 101, 99, .18);
}

.ccs-plan-card--current .ccs-plan-card__header {
    background: #145250;
}

.ccs-plan-card__current-cta {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding-top: 8px;
}

.ccs-plan-card__current-meta {
    font-size: 12px;
    color: #666;
    text-align: center;
    margin: 0;
}

.ccs-plan-card__active-label {
    display: inline-block;
    background: #e6f7f5;
    color: #1a6563;
    border: 1.5px solid #1a6563;
    border-radius: 20px;
    padding: 6px 18px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .02em;
    width: 100%;
    text-align: center;
}

/* ── Switch/Upgrade/Downgrade button ─────────────────────────────────────────── */
.ccs-btn--switch {
    background: #fbd84e !important;
    color: #1b6563 !important;
    width: 100%;
    margin-top: auto;
    display: inline-block;
    padding: 10px 22px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background .2s;
    text-align: center;
}

.ccs-btn--switch:hover,
.ccs-btn--switch:active,
.ccs-btn--switch:focus {
    background: #fbd84e !important;
}

.ccs-btn--sm {
    padding: 7px 14px;
    font-size: 13px;
}

/* ── Status bar (my-subscription top row) ────────────────────────────────────── */
.ccs-sub-statusbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 14px 20px;
    margin-bottom: 28px;
}

.ccs-sub-statusbar__left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    flex-wrap: wrap;
}

.ccs-sub-statusbar__top {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ccs-sub-statusbar__right {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ccs-sub-statusbar__label {
    font-size: 14px;
    color: #555;
    font-weight: 500;
}

.ccs-sub-statusbar__billing {
    font-size: 13px;
    color: #666;
}

.ccs-sub-statusbar__plan-name {
    font-size: 14px;
    font-weight: 700;
    color: #1a6563;
}

/* ── my-subscription heading variant ────────────────────────────────────────── */
.ccs-plans__heading--mysub {
    margin: 60px 0;
    font-size: 24px;
}

/* ── Plan-switch note ────────────────────────────────────────────────────────── */
.ccs-switch-note {
    font-size: 12px;
    color: #999;
    text-align: center;
    margin-top: 24px;
    font-style: italic;
}

/* ── Payment history page ────────────────────────────────────────────────────── */

.ccs-ph-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.ccs-ph-header__title {
    font-size: 26px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 4px;
}

.ccs-ph-header__sub {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* ── Cancel subscription button ──────────────────────────────────────────────── */
.ccs-btn--cancel-sub {
    background: transparent !important;
    color: #D46C4E !important;
    border: 1.5px solid #D46C4E !important;
}

.ccs-btn--cancel-sub:hover {
    background: #D46C4E !important;
    color: #fff !important;
}

.ccs-btn--danger {
    background: #D46C4E !important;
    color: #fff !important;
    display: inline-block;
    padding: 10px 22px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background .2s;
}

.ccs-btn--danger:hover {
    background: #a93226 !important;
}

.ccs-btn--danger:disabled {
    opacity: .65;
    cursor: not-allowed;
}

/* ── Confirmation modal ──────────────────────────────────────────────────────── */
.ccs-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ccs-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    cursor: pointer;
}

.ccs-modal__box {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 36px 32px 28px;
    max-width: 440px;
    width: 92%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
    z-index: 1;
}

.ccs-modal__title {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 12px;
}

.ccs-modal__body {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin: 0 0 24px;
}

.ccs-modal__actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}