/**
 * Guard Billing Portal Styles
 *
 * @package Guard_Billing_API
 */

/* Portal Page Wrapper (minimal template) */
.guard-billing-portal-page {
    margin: 0;
    padding: 0;
    background: #f5f5f5;
    min-height: 100vh;
}

.guard-billing-portal-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

@media (max-width: 768px) {
    .guard-billing-portal-wrapper {
        padding: 20px 15px;
    }
}

/* Portal Navigation */
.guard-billing-portal-nav {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 0 20px;
}

.guard-billing-portal-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    height: 60px;
}

.guard-billing-portal-logo {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    text-decoration: none;
}

.guard-billing-portal-logo:hover {
    color: #0073aa;
}

.guard-billing-portal-nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 8px;
}

.guard-billing-portal-nav-links li {
    margin: 0;
}

.guard-billing-portal-nav-links a {
    display: block;
    padding: 8px 16px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.guard-billing-portal-nav-links a:hover {
    background: #f5f5f5;
    color: #333;
}

.guard-billing-portal-nav-links a.active {
    background: #0073aa;
    color: #fff;
}

.guard-billing-portal-nav-logout {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.guard-billing-portal-nav-logout:hover {
    background: #f8d7da;
    color: #721c24;
}

@media (max-width: 768px) {
    .guard-billing-portal-nav {
        padding: 0 15px;
    }

    .guard-billing-portal-nav-inner {
        flex-wrap: wrap;
        height: auto;
        padding: 12px 0;
        gap: 12px;
    }

    .guard-billing-portal-logo {
        width: 100%;
        text-align: center;
    }

    .guard-billing-portal-nav-links {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 4px;
    }

    .guard-billing-portal-nav-links a {
        padding: 6px 12px;
        font-size: 13px;
    }

    .guard-billing-portal-nav-logout {
        width: 100%;
        text-align: center;
        display: block;
        font-size: 13px;
    }
}

/* Site Switcher */
.guard-billing-site-switcher {
    position: relative;
}

.guard-billing-site-switcher__toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.guard-billing-site-switcher__toggle:hover {
    background: #eee;
    border-color: #ccc;
}

.guard-billing-site-switcher--open .guard-billing-site-switcher__toggle {
    background: #eee;
    border-color: #0073aa;
}

.guard-billing-site-switcher__arrow {
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.guard-billing-site-switcher--open .guard-billing-site-switcher__arrow {
    transform: rotate(180deg);
}

.guard-billing-site-switcher__dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 240px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    overflow: hidden;
}

.guard-billing-site-switcher--open .guard-billing-site-switcher__dropdown {
    display: block;
}

.guard-billing-site-switcher__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 14px;
    background: none;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s ease;
}

.guard-billing-site-switcher__item:last-child {
    border-bottom: none;
}

.guard-billing-site-switcher__item:hover:not([disabled]) {
    background: #f5f8fc;
}

.guard-billing-site-switcher__item--active {
    background: #f0f7ff;
    font-weight: 600;
}

.guard-billing-site-switcher__item[disabled] {
    cursor: default;
}

.guard-billing-site-switcher__item-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.guard-billing-site-switcher__item-status {
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
    white-space: nowrap;
}

.guard-billing-site-switcher__item-status.guard-billing-status-active {
    background: #e6f4ea;
    color: #1e7e34;
}

.guard-billing-site-switcher__item-status.guard-billing-status-warning {
    background: #fff3cd;
    color: #856404;
}

.guard-billing-site-switcher__item-status.guard-billing-status-error {
    background: #f8d7da;
    color: #721c24;
}

.guard-billing-site-switcher__item-status.guard-billing-status-pending {
    background: #e2e3e5;
    color: #383d41;
}

.guard-billing-site-switcher__item-status.guard-billing-status-manual {
    background: #d1ecf1;
    color: #0c5460;
}

@media (max-width: 768px) {
    .guard-billing-site-switcher {
        width: 100%;
        order: -1;
    }

    .guard-billing-site-switcher__toggle {
        width: 100%;
        justify-content: center;
    }

    .guard-billing-site-switcher__dropdown {
        left: 0;
        right: 0;
        min-width: auto;
    }
}

/* Reset & Base */
.guard-billing-portal {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #333;
    line-height: 1.5;
}

.guard-billing-portal * {
    box-sizing: border-box;
}

/* Header */
.guard-billing-header {
    margin-bottom: 30px;
}

.guard-billing-header h1 {
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 5px 0;
    color: #1a1a1a;
}

.guard-billing-site-identity {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-left: 4px solid #0073aa;
    border-radius: 6px;
    padding: 15px 20px;
    margin-top: 10px;
}

.guard-billing-site-name {
    color: #1a1a1a;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 5px 0;
}

.guard-billing-site-url {
    margin: 0;
    font-size: 14px;
}

.guard-billing-site-url a {
    color: #0073aa;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.guard-billing-site-url a:hover {
    text-decoration: underline;
}

.guard-billing-site-url .external-link-icon {
    font-size: 12px;
    opacity: 0.7;
}

.guard-billing-back-link {
    display: inline-block;
    color: #0073aa;
    text-decoration: none;
    font-size: 14px;
}

.guard-billing-back-link:hover {
    text-decoration: underline;
}

/* Cards */
.guard-billing-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.guard-billing-card h2,
.guard-billing-card h3 {
    margin: 0 0 15px 0;
    font-weight: 600;
}

.guard-billing-card h2 {
    font-size: 20px;
}

.guard-billing-card h3 {
    font-size: 16px;
}

/* Grid */
.guard-billing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

/* Buttons */
.guard-billing-button {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.guard-billing-button-primary {
    background: #0073aa;
    color: #fff;
}

.guard-billing-button-primary:hover {
    background: #005a87;
    color: #fff;
}

.guard-billing-button-secondary {
    background: #f0f0f0;
    color: #333;
}

.guard-billing-button-secondary:hover {
    background: #e0e0e0;
}

.guard-billing-button-danger {
    background: #dc3545;
    color: #fff;
}

.guard-billing-button-danger:hover {
    background: #c82333;
    color: #fff;
}

.guard-billing-button-small {
    padding: 6px 12px;
    font-size: 12px;
}

.guard-billing-button-large {
    padding: 14px 28px;
    font-size: 16px;
}

.guard-billing-link {
    color: #0073aa;
    text-decoration: none;
    font-size: 14px;
}

.guard-billing-link:hover {
    text-decoration: underline;
}

/* Status Badges */
.guard-billing-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

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

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

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

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

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

/* Notices */
.guard-billing-notice {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.guard-billing-notice p {
    margin: 0 0 10px 0;
}

.guard-billing-notice p:last-child {
    margin-bottom: 0;
}

.guard-billing-notice-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.guard-billing-notice-warning {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
}

.guard-billing-notice-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Plans Grid */
.guard-billing-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Plan upgrade CTA box */
.guard-billing-plan-cta {
    background: #f0f6ff;
    border: 1px solid #c5d9f0;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 24px;
    color: #1d3557;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
}

.guard-billing-plan-card {
    position: relative;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.guard-billing-plan-card:hover {
    border-color: #0073aa;
}

.guard-billing-plan-label {
    display: block;
    cursor: pointer;
}

.guard-billing-plan-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.guard-billing-plan-label input[type="radio"]:checked + .guard-billing-plan-content {
    background: #f0f7ff;
    border-color: #0073aa;
}

.guard-billing-plan-card:has(input[type="radio"]:checked) {
    border-color: #0073aa;
}

.guard-billing-plan-content {
    padding: 24px;
    position: relative;
}

.guard-billing-plan-content h3 {
    font-size: 20px;
    margin: 0 0 10px 0;
}

.guard-billing-plan-price {
    font-size: 32px;
    font-weight: 700;
    color: #0073aa;
    margin-bottom: 10px;
}

.guard-billing-plan-price span {
    font-size: 14px;
    font-weight: 400;
    color: #666;
}

.guard-billing-plan-price-yearly-total {
    font-size: 13px;
    color: #888;
    margin-top: -6px;
    margin-bottom: 8px;
}

.guard-billing-plan-description {
    color: #666;
    margin-bottom: 15px;
}

.guard-billing-plan-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.guard-billing-plan-features li {
    padding: 4px 0;
    font-size: 14px;
}

.guard-billing-plan-features li::before {
    content: "✓";
    color: #28a745;
    margin-right: 8px;
}

.guard-billing-popular-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #0073aa;
    color: #fff;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.guard-billing-current-badge {
    display: inline-block;
    background: #e0e0e0;
    color: #666;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    margin-top: 10px;
}

/* Add-ons Grid */
.guard-billing-addons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.guard-billing-addon-card {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    transition: border-color 0.2s ease;
}

.guard-billing-addon-card:hover {
    border-color: #0073aa;
}

.guard-billing-addon-label {
    display: flex;
    align-items: flex-start;
    padding: 14px 16px;
    cursor: pointer;
    gap: 10px;
}

.guard-billing-addon-label input[type="checkbox"] {
    margin: 2px 0 0 0;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.guard-billing-addon-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.guard-billing-addon-name {
    font-weight: 500;
    font-size: 14px;
    line-height: 1.3;
}

.guard-billing-addon-price {
    color: #888;
    font-size: 13px;
}

/* Add-on List */
.guard-billing-addon-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.guard-billing-addon-list li {
    padding: 6px 0;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
}

.guard-billing-addon-list li:last-child {
    border-bottom: none;
}

/* Order Summary */
.guard-billing-order-summary {
    background: #f9f9f9;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}

.guard-billing-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.guard-billing-summary-row:last-child {
    border-bottom: none;
}

.guard-billing-summary-total {
    font-weight: 600;
    font-size: 18px;
    padding-top: 12px;
    margin-top: 8px;
    border-top: 2px solid #e0e0e0;
}

/* Info Rows */
.guard-billing-info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.guard-billing-info-row:last-child {
    border-bottom: none;
}

.guard-billing-info-label {
    color: #666;
}

.guard-billing-info-value {
    font-weight: 500;
}

/* Storage Bar */
.guard-billing-storage-bar {
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.guard-billing-storage-progress {
    height: 100%;
    background: #0073aa;
    transition: width 0.3s ease;
}

.guard-billing-storage-bar.storage-warning .guard-billing-storage-progress {
    background: #ffc107;
}

.guard-billing-storage-bar.storage-critical .guard-billing-storage-progress {
    background: #dc3545;
}

/* Segmented storage bar */
.guard-billing-segments-bar {
    display: flex;
    height: 14px;
    border-radius: 7px;
    background: #e5e7eb;
    overflow: hidden;
    margin-bottom: 8px;
}

.guard-billing-segment {
    position: relative;
    min-width: 3px;
    cursor: pointer;
}

.guard-billing-segment--uploads {
    background: #3b82f6;
}

.guard-billing-segment--database {
    background: #f59e0b;
}

.guard-billing-segment--other {
    background: #10b981;
}

.guard-billing-segment-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e1e2f;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 10;
}

.guard-billing-segment-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1e1e2f;
}

.guard-billing-segment:hover .guard-billing-segment-tooltip {
    display: block;
}

/* Storage legend */
.guard-billing-storage-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 6px;
    font-size: 11px;
    color: #666;
}

.guard-billing-legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.guard-billing-legend-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.guard-billing-legend-dot--uploads {
    background: #3b82f6;
}

.guard-billing-legend-dot--database {
    background: #f59e0b;
}

.guard-billing-legend-dot--other {
    background: #10b981;
}

.guard-billing-legend-dot--available {
    background: #e5e7eb;
}

.guard-billing-segment--used {
    background: #0073aa;
}

.guard-billing-legend-dot--used {
    background: #0073aa;
}

.guard-billing-storage-details {
    margin-bottom: 15px;
}

.guard-billing-storage-hint {
    font-size: 13px;
    color: #666;
    margin: 10px 0 0 0;
}

/* Storage Summary & Packages */
.guard-billing-storage-summary {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.guard-billing-storage-auto-scale {
    margin-bottom: 20px;
    padding: 15px;
    background: #f0f7ff;
    border-radius: 6px;
    border-left: 4px solid #0073aa;
}

.guard-billing-storage-auto-scale h3 {
    margin: 0 0 8px 0;
    font-size: 15px;
}

.guard-billing-storage-auto-desc {
    margin: 0;
    font-size: 14px;
    color: #333;
}

.guard-billing-storage-packages {
    margin-bottom: 20px;
}

.guard-billing-storage-packages h3 {
    margin: 0 0 8px 0;
    font-size: 15px;
}

.guard-billing-storage-packages > p {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #666;
}

.guard-billing-storage-packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 15px;
}

.guard-billing-storage-package {
    display: block;
    background: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.guard-billing-storage-package input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.guard-billing-storage-package:hover {
    border-color: #0073aa;
    background: #f5f9fc;
}

.guard-billing-storage-package:has(input:checked),
.guard-billing-storage-package.is-current {
    border-color: #0073aa;
    background: #f0f7fc;
}

.guard-billing-storage-package .guard-billing-current-badge {
    position: absolute;
    top: -10px;
    right: 10px;
    background: #0073aa;
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.guard-billing-storage-package-none {
    background: #fff;
}

.guard-billing-storage-package-amount {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.guard-billing-storage-package-price {
    font-size: 16px;
    font-weight: 600;
    color: #0073aa;
    margin-bottom: 4px;
}

.guard-billing-storage-package-rate {
    font-size: 12px;
    color: #666;
}

.guard-billing-storage-contact {
    font-size: 13px;
    color: #666;
    margin: 0;
}

.guard-billing-storage-upgrade-hint {
    padding: 12px 15px;
    background: #fff3cd;
    border-radius: 6px;
    margin-top: 15px;
}

.guard-billing-storage-upgrade-hint p {
    margin: 0;
    font-size: 14px;
    color: #856404;
}

@media (max-width: 768px) {
    .guard-billing-storage-packages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.guard-billing-storage-text {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* Billing Calculator */
.guard-billing-calculator {
    background: #f8f9fa;
    border: 2px solid #0073aa;
    border-radius: 8px;
    padding: 24px;
}

.guard-billing-calculator h2 {
    margin-bottom: 15px;
}

.guard-billing-calculator-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.guard-billing-calculator-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.guard-billing-calculator-row:last-child {
    border-bottom: none;
}

.guard-billing-calculator-label {
    font-size: 14px;
    color: #333;
}

.guard-billing-calculator-value {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.guard-billing-calculator-total {
    margin-top: 5px;
    padding-top: 15px;
    border-top: 2px solid #0073aa;
    border-bottom: none;
}

.guard-billing-calculator-total .guard-billing-calculator-label {
    font-size: 16px;
    font-weight: 600;
}

.guard-billing-calculator-total .guard-billing-calculator-value {
    font-size: 20px;
    font-weight: 700;
    color: #0073aa;
}

/* Quick Actions */
.guard-billing-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Checkout Actions */
.guard-billing-checkout-actions {
    text-align: center;
    margin-top: 20px;
}

.guard-billing-checkout-note {
    font-size: 13px;
    color: #666;
    margin-top: 10px;
}

/* Invoices Table */
.guard-billing-invoices-table-wrapper {
    overflow-x: auto;
}

.guard-billing-invoices-table {
    width: 100%;
    border-collapse: collapse;
}

.guard-billing-invoices-table th,
.guard-billing-invoices-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.guard-billing-invoices-table th {
    font-weight: 600;
    background: #f9f9f9;
}

.guard-billing-invoice-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.guard-billing-invoice-status-badge.status-paid {
    background: #d4edda;
    color: #155724;
}

.guard-billing-invoice-status-badge.status-open {
    background: #fff3cd;
    color: #856404;
}

.guard-billing-invoice-status-badge.status-other {
    background: #e2e3e5;
    color: #383d41;
}

/* Empty State */
.guard-billing-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

/* Login Required / No Account */
.guard-billing-login-required,
.guard-billing-no-account,
.guard-billing-already-subscribed {
    text-align: center;
}

.guard-billing-login-required .guard-billing-card,
.guard-billing-no-account .guard-billing-card,
.guard-billing-already-subscribed .guard-billing-card {
    max-width: 400px;
    margin: 40px auto;
}

/* Overview Card (simplified dashboard) */
.guard-billing-overview-card {
    padding: 30px;
}

.guard-billing-overview-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    margin-bottom: 24px;
}

.guard-billing-overview-info {
    flex: 1;
}

.guard-billing-overview-status {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.guard-billing-overview-plan {
    font-size: 22px;
    font-weight: 600;
    color: #1a1a1a;
}

.guard-billing-overview-detail {
    font-size: 14px;
    color: #666;
    margin: 0 0 12px 0;
}

.guard-billing-overview-addons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.guard-billing-addon-badge {
    display: inline-block;
    padding: 3px 10px;
    background: #e7f3ff;
    color: #0073aa;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.guard-billing-overview-storage {
    padding-top: 20px;
    border-top: 1px solid #eee;
    margin-bottom: 0;
}

.guard-billing-overview-storage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.guard-billing-overview-storage-label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.guard-billing-overview-storage .guard-billing-storage-bar {
    width: 100%;
    margin-bottom: 6px;
}

.guard-billing-overview-storage-text {
    font-size: 13px;
    color: #666;
}

.guard-billing-overview-action {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

@media (max-width: 768px) {
    .guard-billing-overview-main {
        flex-direction: column;
        gap: 20px;
    }

    .guard-billing-overview-storage {
        padding-top: 16px;
    }
}

/* Billing Interval Toggle */
.guard-billing-interval-toggle {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 24px;
    background: #f0f0f0;
    border-radius: 8px;
    padding: 4px;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

.guard-billing-interval-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    transition: all 0.2s ease;
    flex: 1;
    justify-content: center;
}

.guard-billing-interval-option input[type="radio"] {
    display: none;
}

.guard-billing-interval-option.active {
    background: #fff;
    color: #333;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.guard-billing-save-badge {
    display: inline-block;
    background: #28a745;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 4px;
}

/* Per-user price */
.guard-billing-per-user {
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
}

/* Plan limits */
.guard-billing-plan-limits {
    list-style: none;
    padding: 0;
    margin: 0 0 12px 0;
}

.guard-billing-plan-limits li {
    padding: 3px 0;
    font-size: 13px;
    color: #555;
}

.guard-billing-plan-limits li::before {
    content: "\2022";
    color: #0073aa;
    margin-right: 8px;
    font-weight: bold;
}

/* Tier feature checklist */
.guard-billing-tier-features {
    list-style: none;
    padding: 0;
    margin: 0 0 12px 0;
    border-top: 1px solid #eee;
    padding-top: 12px;
}

.guard-billing-tier-features li {
    padding: 4px 0;
    font-size: 13px;
    padding-left: 24px;
    position: relative;
}

.guard-billing-tier-features li.feature-included::before {
    content: "\2713";
    color: #28a745;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.guard-billing-tier-features li.feature-excluded {
    color: #bbb;
    text-decoration: line-through;
}

.guard-billing-tier-features li.feature-excluded::before {
    content: "\2717";
    color: #ccc;
    position: absolute;
    left: 0;
}

/* Featured plan card */
.guard-billing-plan-featured {
    border-color: #0073aa;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.15);
}

/* Add-on category heading */
.guard-billing-addon-category {
    font-size: 15px;
    font-weight: 600;
    color: #555;
    margin: 20px 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 12px;
}

/* Add-on included state */
.guard-billing-addon-card.addon-included {
    opacity: 0.7;
    background: #f8f9fa;
}

.guard-billing-addon-card.addon-included:hover {
    border-color: #e0e0e0;
}

.guard-billing-addon-disabled {
    cursor: default !important;
}

.guard-billing-addon-included-label {
    color: #46b450;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
}

/* Extra Users Quantity Card */
.guard-billing-extra-users-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    margin-bottom: 12px;
}

.guard-billing-extra-users-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.guard-billing-extra-users-name {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.guard-billing-extra-users-desc {
    font-size: 12px;
    color: #666;
}

.guard-billing-extra-users-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.guard-billing-extra-users-input-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.guard-billing-extra-users-input-wrap label {
    font-size: 11px;
    color: #666;
    font-weight: 500;
}

.guard-billing-extra-users-input-wrap input[type="number"] {
    width: 70px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}

.guard-billing-extra-users-price {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .guard-billing-extra-users-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .guard-billing-extra-users-controls {
        width: 100%;
        justify-content: space-between;
    }
}

/* Annual summary rows */
.guard-billing-calculator-monthly-equiv,
.guard-billing-calculator-annual-total {
    color: #666;
    font-size: 13px;
}

.guard-billing-calculator-annual-total .guard-billing-calculator-value {
    font-weight: 600;
    color: #0073aa;
}

/* Account Transfer Form */
.guard-billing-transfer-form {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.guard-billing-form-group {
    margin-bottom: 16px;
}

.guard-billing-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 6px;
}

.guard-billing-form-group input[type="email"],
.guard-billing-form-group input[type="password"] {
    width: 100%;
    max-width: 400px;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    transition: border-color 0.2s ease;
}

.guard-billing-form-group input[type="email"]:focus,
.guard-billing-form-group input[type="password"]:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.15);
}

.guard-billing-transfer-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Retention Offer Modal */
.guard-billing-retention-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.guard-billing-retention-modal {
    max-width: 500px;
    width: 100%;
}

.guard-billing-retention-content {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.guard-billing-retention-content h2 {
    margin: 0 0 16px 0;
    font-size: 22px;
    font-weight: 600;
    color: #1a1a1a;
}

.guard-billing-retention-message {
    color: #555;
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 16px;
}

.guard-billing-retention-message p {
    margin: 0;
}

.guard-billing-retention-discount {
    background: #f0f7ff;
    border: 1px solid #c5d9f0;
    border-radius: 8px;
    padding: 14px 20px;
    margin-bottom: 24px;
    color: #0073aa;
    font-size: 16px;
}

.guard-billing-retention-discount p {
    margin: 0;
}

.guard-billing-retention-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.guard-billing-retention-actions .guard-billing-button {
    width: 100%;
}

/* Loading State */
.guard-billing-loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
    .guard-billing-portal {
        padding: 15px;
    }

    .guard-billing-header h1 {
        font-size: 22px;
    }

    .guard-billing-card {
        padding: 16px;
    }

    .guard-billing-plans-grid,
    .guard-billing-addons-grid {
        grid-template-columns: 1fr;
    }

    .guard-billing-invoices-table th,
    .guard-billing-invoices-table td {
        padding: 8px;
        font-size: 13px;
    }

    .guard-billing-quick-actions {
        flex-direction: column;
    }

    .guard-billing-quick-actions .guard-billing-button {
        width: 100%;
    }
}
