/**
 * TitanCart Subscriptions — Storefront Styles
 *
 * Covers:
 *   - PDP plan selector pills
 *   - My Account subscriptions list
 *   - Status badges
 *
 * @package TitanCartSubscriptions
 */

/* ══════════════════════════════════════════════════════════════════════════
 * PDP PLAN SELECTOR
 * ══════════════════════════════════════════════════════════════════════ */

.tc-sub-plans {
    margin: 16px 0 20px;
    padding: 16px;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    background: #fafafa;
}
.tc-sub-plans__label {
    font-size: 13px;
    font-weight: 600;
    color: #1c2430;
    margin-bottom: 12px;
}
.tc-sub-plans__options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.tc-sub-plans__pill {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.tc-sub-plans__pill:hover {
    border-color: #bfdbfe;
}
.tc-sub-plans__pill--active {
    border-color: #2563EB;
    box-shadow: 0 0 0 1px #2563EB;
}
.tc-sub-plans__pill-radio {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    flex-shrink: 0;
    margin-top: 2px;
    position: relative;
    transition: border-color .15s ease;
}
.tc-sub-plans__pill--active .tc-sub-plans__pill-radio {
    border-color: #2563EB;
}
.tc-sub-plans__pill--active .tc-sub-plans__pill-radio::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2563EB;
}
.tc-sub-plans__pill-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.tc-sub-plans__pill-name {
    font-size: 14px;
    font-weight: 600;
    color: #1c2430;
}
.tc-sub-plans__pill-price {
    font-size: 13px;
    color: #5a6270;
}
.tc-sub-plans__pill-trial {
    font-size: 11px;
    font-weight: 500;
    color: #16A34A;
    margin-top: 2px;
}
.tc-sub-plans__pill-fee {
    font-size: 11px;
    color: #D97706;
    margin-top: 1px;
}

/* ══════════════════════════════════════════════════════════════════════════
 * STATUS BADGES (shared PDP + My Account + Admin)
 * ══════════════════════════════════════════════════════════════════════ */

.tc-sub-status {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: capitalize;
}
.tc-sub-status--active     { background: #ecfdf5; color: #16A34A; }
.tc-sub-status--pending    { background: #fef6ec; color: #D97706; }
.tc-sub-status--on-hold    { background: #eef4fe; color: #2563EB; }
.tc-sub-status--past-due   { background: #fef2f2; color: #DC2626; }
.tc-sub-status--cancelled  { background: #f5f5f5; color: #71797E; }
.tc-sub-status--expired    { background: #f5f5f5; color: #9CA3AF; }

/* ══════════════════════════════════════════════════════════════════════════
 * MY ACCOUNT — SUBSCRIPTIONS SECTION
 * ══════════════════════════════════════════════════════════════════════ */

.tc-my-subs__header {
    margin-bottom: 20px;
}
.tc-my-subs__title {
    font-size: 20px;
    font-weight: 700;
    color: #1c2430;
    margin: 0;
}

/* Empty state */
.tc-my-subs__empty {
    text-align: center;
    padding: 48px 24px;
    color: #9CA3AF;
}
.tc-my-subs__empty svg {
    margin-bottom: 16px;
    opacity: .4;
}
.tc-my-subs__empty p {
    font-size: 15px;
    margin-bottom: 16px;
}
.tc-my-subs__browse-btn {
    display: inline-block;
    padding: 10px 24px;
    background: #1c2430;
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background .15s ease;
}
.tc-my-subs__browse-btn:hover {
    background: #2563EB;
    color: #fff;
}

/* Subscription cards */
.tc-my-subs__list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.tc-my-subs__card {
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 20px;
    background: #fff;
    transition: box-shadow .15s ease;
}
.tc-my-subs__card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.tc-my-subs__card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}
.tc-my-subs__card-plan {
    display: flex;
    align-items: center;
    gap: 10px;
}
.tc-my-subs__card-name {
    font-size: 16px;
    font-weight: 600;
    color: #1c2430;
}
.tc-my-subs__card-price {
    font-size: 14px;
    font-weight: 600;
    color: #2563EB;
}

/* Detail grid */
.tc-my-subs__card-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 16px;
}
.tc-my-subs__card-label {
    display: block;
    font-size: 11px;
    color: #9CA3AF;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 4px;
}
.tc-my-subs__card-value {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #1c2430;
}

/* Action buttons */
.tc-my-subs__card-actions {
    display: flex;
    gap: 8px;
}
.tc-my-subs__action-btn {
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid #e5e5e5;
    background: #fff;
    color: #5a6270;
    transition: all .15s ease;
}
.tc-my-subs__action-btn:hover {
    background: #f5f5f5;
}
.tc-my-subs__action-btn--pause {
    border-color: #bfdbfe;
    color: #2563EB;
}
.tc-my-subs__action-btn--pause:hover {
    background: #eef4fe;
}
.tc-my-subs__action-btn--resume {
    border-color: #bbf7d0;
    color: #16A34A;
    background: #ecfdf5;
}
.tc-my-subs__action-btn--resume:hover {
    background: #dcfce7;
}
.tc-my-subs__action-btn--cancel {
    border-color: #fecaca;
    color: #DC2626;
}
.tc-my-subs__action-btn--cancel:hover {
    background: #fef2f2;
}
.tc-my-subs__action-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* Action feedback message */
.tc-my-subs__msg {
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 16px;
}
.tc-my-subs__msg--success { background: #ecfdf5; color: #16A34A; }
.tc-my-subs__msg--error   { background: #fef2f2; color: #DC2626; }

/* ══════════════════════════════════════════════════════════════════════════
 * RESPONSIVE
 * ══════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .tc-my-subs__card-details {
        grid-template-columns: 1fr 1fr;
    }
    .tc-my-subs__card-header {
        flex-direction: column;
        gap: 8px;
    }
    .tc-my-subs__card-actions {
        flex-wrap: wrap;
    }
}
@media (max-width: 480px) {
    .tc-my-subs__card-details {
        grid-template-columns: 1fr;
    }
    .tc-sub-plans__pill {
        padding: 10px 12px;
    }
}
