/* Clinic Manager — Billing & Subscriptions styles
   Shared by templates/billing.php (clinic owner) and
   templates/plans-billing.php (Super Admin). Layers on top of
   style.css (.cm-card/.cm-btn/.cm-table) and super-admin.css (.cm-sa-*). */

.cm-billing-empty { color: #94a3b8; font-size: .86rem; padding: 10px 0; }

/* "Plan expiring soon" / "account suspended" banner shown above the
   portal's main content (see cm_portal_render_app() in
   includes/frontend-portal.php). */
.cm-billing-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    font-size: .86rem;
    font-weight: 600;
    flex-wrap: wrap;
}
.cm-billing-alert i { font-size: 1rem; }
.cm-billing-alert span { flex: 1 1 260px; }
.cm-billing-alert-warn { background: #fffbeb; color: #92400e; border-bottom: 1px solid #fde68a; }
.cm-billing-alert-suspended { background: #fef2f2; color: #991b1b; border-bottom: 1px solid #fecaca; }
.cm-billing-alert-cta { flex: 0 0 auto; padding: 6px 16px !important; font-size: .8rem !important; }
.cm-billing-alert-dismiss {
    background: none; border: none; cursor: pointer; font-size: 1.1rem;
    line-height: 1; color: inherit; opacity: .6; padding: 0 4px; flex: 0 0 auto;
}
.cm-billing-alert-dismiss:hover { opacity: 1; }

.cm-plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 16px;
    margin-top: 14px;
}

.cm-plan-card {
    border: 1px solid var(--cm-border, #e2e8f0);
    border-radius: 14px;
    padding: 18px;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: box-shadow .15s, border-color .15s;
}
.cm-plan-card:hover { border-color: #c7d2fe; box-shadow: 0 6px 16px rgba(79,70,229,.10); }
.cm-plan-card h3 { margin: 0; font-size: 1.02rem; font-weight: 800; color: #1e293b; }

.cm-plan-cycle-badge {
    align-self: flex-start;
    background: #ede9fe;
    color: #6d28d9;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
    padding: 3px 9px;
    border-radius: 999px;
}

.cm-plan-price { font-size: 1.35rem; font-weight: 800; color: #4f46e5; margin: 4px 0 0; }
.cm-plan-price span { font-size: .74rem; font-weight: 600; color: #94a3b8; }

.cm-plan-trial-note { font-size: .74rem; color: #16a34a; font-weight: 600; }
.cm-plan-desc { font-size: .82rem; color: #64748b; margin: 4px 0 10px; flex-grow: 1; }
.cm-plan-card .cm-btn { width: 100%; justify-content: center; }
.cm-plan-gateway-btns { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.cm-plan-gateway-btns .cm-btn { margin: 0; }

.cm-billing-status-card {
    border: 1px solid var(--cm-border, #e2e8f0);
    border-radius: 12px;
    padding: 16px 18px;
}
.cm-billing-status-top { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 10px; }
.cm-billing-status-top h3 { margin: 0 0 6px; font-size: 1.05rem; font-weight: 800; color: #1e293b; }
.cm-billing-amount { font-size: 1.2rem; font-weight: 800; color: #1e293b; }
.cm-billing-amount span { font-size: .74rem; font-weight: 600; color: #94a3b8; }
.cm-billing-status-rows { display: flex; flex-wrap: wrap; gap: 18px; margin: 12px 0; font-size: .84rem; color: #475569; }
.cm-billing-status-rows strong { color: #1e293b; font-weight: 700; }
.cm-billing-status-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.cm-billing-suspended-note {
    display: flex; align-items: center; gap: 8px;
    background: #fef2f2; color: #991b1b; border: 1px solid #fecaca;
    border-radius: 8px; padding: 8px 12px; font-size: .82rem; font-weight: 600;
    margin-bottom: 12px;
}

.cm-status-pill {
    display: inline-block;
    padding: 3px 11px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: capitalize;
}
.cm-status-ok    { background: #dcfce7; color: #166534; }
.cm-status-warn  { background: #fef3c7; color: #92400e; }
.cm-status-bad   { background: #fee2e2; color: #991b1b; }
.cm-status-muted { background: #f1f5f9; color: #475569; }

.cm-btn-danger-outline {
    background: #fff;
    color: #dc2626;
    border: 1px solid #fecaca;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
}
.cm-btn-danger-outline:hover { background: #fee2e2; }

.cm-btn-icon {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    width: 30px;
    height: 30px;
    border-radius: 7px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.cm-btn-icon:hover { background: #eef2ff; color: #4f46e5; border-color: #c7d2fe; }
.cm-sa-plan-delete:hover { background: #fee2e2 !important; color: #b91c1c !important; border-color: #fecaca !important; }
