/* === Billing Dashboard Container === */
.plcs-billing-dashboard {
    max-width: 900px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #333;
}

/* === Houzez Dashboard Integration === */
.dashboard-content .plcs-billing-dashboard {
    max-width: 100%;
    margin: 0;
}
.dashboard-content .plcs-billing-dashboard .plcs-section {
    margin-bottom: 22px;
}
.dashboard-content .plcs-billing-dashboard .plcs-section-title {
    font-size: 16px;
    margin-bottom: 14px;
}
.dashboard-content .plcs-billing-dashboard .plcs-package-name {
    font-size: 18px;
}
.plcs-billing-dashboard a {
    color: #0073aa;
    text-decoration: none;
}
.plcs-billing-dashboard a:hover {
    text-decoration: underline;
}

/* === Sections === */
.plcs-section {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.plcs-section-title {
    margin: 0 0 18px;
    font-size: 18px;
    font-weight: 600;
    color: #222;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

/* === Package Card === */
.plcs-package-card {
    position: relative;
}
.plcs-package-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #111;
}
.plcs-package-status {
    margin-bottom: 15px;
}

/* === Status Badges === */
.plcs-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.plcs-status-active {
    background: #e8f5e9;
    color: #2e7d32;
}
.plcs-status-expiring {
    background: #fff3e0;
    color: #e65100;
}
.plcs-status-expired {
    background: #ffebee;
    color: #c62828;
}

/* === Package Details === */
.plcs-package-details {
    margin-bottom: 20px;
}
.plcs-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 14px;
}
.plcs-detail-label {
    color: #666;
    min-width: 120px;
}
.plcs-detail-value {
    font-weight: 500;
    text-align: right;
}
.plcs-expiry-active { color: #2e7d32; }
.plcs-expiry-expiring { color: #e65100; }
.plcs-expiry-expired { color: #c62828; }

/* === Progress Bars === */
.plcs-progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin: 5px 0 12px;
}
.plcs-progress-fill {
    height: 100%;
    background: #0073aa;
    border-radius: 4px;
    transition: width 0.4s ease;
}
.plcs-progress-featured {
    background: #FF9800;
}

/* === No Package === */
.plcs-no-package {
    text-align: center;
    padding: 20px;
}
.plcs-no-package p {
    font-size: 15px;
    color: #666;
    margin-bottom: 15px;
}

/* === Buttons === */
.plcs-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none !important;
    border: none;
}
.plcs-btn-primary {
    background: #0073aa;
    color: #fff !important;
}
.plcs-btn-primary:hover {
    background: #005a87;
}
.plcs-btn-warning {
    background: #FF9800;
    color: #fff !important;
}
.plcs-btn-warning:hover {
    background: #e68900;
}
.plcs-btn-sm {
    padding: 4px 12px;
    font-size: 12px;
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}
.plcs-btn-sm:hover {
    background: #e0e0e0;
}
.plcs-renew-btn {
    margin-top: 10px;
}

/* === Warning Banner === */
.plcs-warning-banner {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #fff8e1;
    border: 1px solid #ffcc02;
    border-radius: 8px;
    padding: 18px 20px;
}
.plcs-warning-icon {
    font-size: 28px;
    color: #FF9800;
    flex-shrink: 0;
}
.plcs-warning-text {
    flex: 1;
}
.plcs-warning-text strong {
    font-size: 15px;
    color: #e65100;
}
.plcs-warning-text p {
    margin: 5px 0 0;
    color: #666;
    font-size: 13px;
}
.plcs-renewal-warning .plcs-section {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

/* === Billing Table === */
.plcs-table-wrap {
    overflow-x: auto;
}
.plcs-billing-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.plcs-billing-table thead th {
    background: #f8f9fa;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #e0e0e0;
    white-space: nowrap;
}
.plcs-billing-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}
.plcs-billing-table tbody tr:hover {
    background: #fafafa;
}

/* Order Status Badges in Table */
.plcs-order-status-completed,
.plcs-order-status-wc-completed {
    display: inline-block;
    padding: 2px 10px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}
.plcs-order-status-processing,
.plcs-order-status-wc-processing {
    display: inline-block;
    padding: 2px 10px;
    background: #e3f2fd;
    color: #1565c0;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}
.plcs-order-status-on-hold,
.plcs-order-status-wc-on-hold {
    display: inline-block;
    padding: 2px 10px;
    background: #fff3e0;
    color: #e65100;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}
.plcs-order-status-refunded,
.plcs-order-status-wc-refunded {
    display: inline-block;
    padding: 2px 10px;
    background: #fce4ec;
    color: #c62828;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}
.plcs-order-status-cancelled,
.plcs-order-status-wc-cancelled,
.plcs-order-status-failed,
.plcs-order-status-wc-failed {
    display: inline-block;
    padding: 2px 10px;
    background: #f5f5f5;
    color: #757575;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}
.plcs-order-status-paid,
.plcs-order-status-pending {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}
.plcs-order-status-paid {
    background: #e8f5e9;
    color: #2e7d32;
}
.plcs-order-status-pending {
    background: #fff8e1;
    color: #f57f17;
}

/* === Mobile Responsive === */
@media screen and (max-width: 768px) {
    .plcs-section {
        padding: 15px;
        border-radius: 0;
        margin-bottom: 15px;
    }
    .plcs-section-title {
        font-size: 16px;
    }
    .plcs-package-name {
        font-size: 17px;
    }
    .plcs-detail-row {
        flex-direction: column;
        gap: 3px;
    }
    .plcs-detail-label {
        min-width: auto;
    }
    .plcs-detail-value {
        text-align: left;
    }
    .plcs-warning-banner {
        flex-direction: column;
        text-align: center;
    }
    .plcs-billing-table thead {
        display: none;
    }
    .plcs-billing-table tbody tr {
        display: block;
        margin-bottom: 12px;
        border: 1px solid #e0e0e0;
        border-radius: 6px;
        padding: 10px;
    }
    .plcs-billing-table tbody td {
        display: flex;
        justify-content: space-between;
        padding: 6px 0;
        border-bottom: 1px solid #f0f0f0;
        font-size: 13px;
    }
    .plcs-billing-table tbody td:last-child {
        border-bottom: none;
    }
    .plcs-billing-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #555;
        margin-right: 10px;
        flex-shrink: 0;
    }
    .plcs-package-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .plcs-package-badges {
        flex-wrap: wrap;
        gap: 6px;
    }
}

/* =====================================================
   RENEWAL SYSTEM — New styles (v1.1.0)
   ===================================================== */

/* === Package Card Header (name + badges row) === */
.plcs-package-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}
.plcs-package-card-header .plcs-package-name {
    margin-bottom: 0;
}
.plcs-package-badges {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

/* === Days-Remaining Chip === */
.plcs-days-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2px;
}
.plcs-days-chip-active {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #90caf9;
}
.plcs-days-chip-expiring {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffcc80;
    animation: plcs-pulse 2s ease-in-out infinite;
}
@keyframes plcs-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.7; }
}

/* === Assets-Protected Badge === */
.plcs-renewal-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    border: 1px solid #a5d6a7;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #2e7d32;
    cursor: default;
    transition: box-shadow 0.2s ease;
}
.plcs-renewal-badge:hover {
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.15);
}
.plcs-renewal-badge-icon {
    font-size: 14px;
    line-height: 1;
}

/* === Renewal Info Box === */
.plcs-renewal-info-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #f0f9f0;
    border: 1px solid #c8e6c9;
    border-radius: 6px;
    padding: 12px 16px;
    margin: 16px 0 14px;
    font-size: 13px;
    color: #2e7d32;
    line-height: 1.5;
}
.plcs-renewal-info-icon {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* === Renewal Perks List (in warning banner) === */
.plcs-renewal-perks {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    font-size: 12px;
    color: #5d4037;
}
.plcs-renewal-perks li {
    margin: 3px 0;
    color: #4e342e;
}

/* === Renewal History Section === */
.plcs-renewal-history {
    /* inherits .plcs-section card look */
}
.plcs-renewal-empty {
    color: #888;
    font-size: 14px;
    font-style: italic;
    margin: 0;
}

/* === Renewal Table specific === */
.plcs-renewal-table .plcs-expiry-old {
    color: #c62828;
    font-size: 13px;
    text-decoration: line-through;
    opacity: 0.8;
}
.plcs-renewal-table .plcs-expiry-new {
    color: #2e7d32;
    font-weight: 600;
    font-size: 13px;
}

/* === Carry-Over Badge === */
.plcs-carryover-badge {
    display: inline-block;
    padding: 2px 10px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #c8e6c9;
}
.plcs-no-carryover {
    color: #aaa;
    font-size: 12px;
}

/* === Inline Carry-Over Badge (shown next to slot count in package card) === */
.plcs-carryover-inline {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    padding: 2px 9px;
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    vertical-align: middle;
    cursor: default;
    white-space: nowrap;
}
.plcs-carryover-inline::before {
    content: '↑';
    margin-right: 3px;
    font-size: 10px;
}

