/**
 * Subscription Plans Page Styles
 * Status: NEW - Clean CSS styling for subscription plans page
 */

.subscription-plans-page {
    padding: 40px 0;
}

.subscription-plans-page .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.subscription-plans-page h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #454545;
}

.subscription-plans-page .page-content {
    margin-bottom: 40px;
    line-height: 1.6;
}

.subscription-plans-page .subscription-plans-section {
    margin-top: 40px;
}

/* Plan Display Styles */
.isen-plan-card {
    max-width: 400px;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.isen-plan-card:hover {
}

.isen-current-plan-card::before {
  /*opacity: 0.4; */
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.6); /* translucent overlay */
  z-index: 1;
}

[data-theme="dark"] .isen-current-plan-card::before {
  background: rgba(0,0,0,0.6); /* translucent overlay */
}


.isen-plan-header {
    text-align: center;
    margin-bottom: 20px;
}


.isen-tokens-info {
    margin-bottom: 20px;
}

.isen-plan-name {
    font-size: 24px;
    font-weight: 600;
    color: #454545;
    margin-bottom: 10px;
}

.isen-plan-price {
    margin-bottom: 5px;
}

.isen-plan-price .currency {
}

.isen-plan-price .period {
}

.isen-plan-tokens {
    font-size: 18px;
    margin-bottom: 20px;
}


.isen-plan-features h4 {
    font-size: 16px;
    font-weight: 600;
    color: #454545;
    margin-bottom: 15px;
}

.isen-plan-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.isen-plan-features li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    color: #555;
}

.isen-plan-features li:last-child {
    border-bottom: none;
}

.isen-plan-features li:before {
    content: "✓";
    color: #28a745;
    font-weight: bold;
    margin-right: 10px;
}

/* Additional features styling */
.isen-features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.isen-features-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    color: #555;
    position: relative;
    padding-left: 25px;
}

.isen-features-list li:before {
    content: "✓";
    color: #28a745;
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 8px;
}

.isen-features-list li:last-child {
    border-bottom: none;
}

.isen-no-features {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    border: 1px dashed #dee2e6;
}

/* Debug information styling */
.isen-debug-info {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 15px;
    margin: 20px 0;
    font-family: monospace;
    font-size: 12px;
    color: #666;
}

.isen-debug-info h4 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 14px;
}

.isen-plan-actions {
    text-align: center;
}

.isen-plan-button {
    display: inline-block;
    padding: 12px 30px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.isen-plan-button:hover {
    background: #005a87;
    color: #fff;
    text-decoration: none;
}

.isen-plan-button.secondary {
    background: #6c757d;
}

.isen-plan-button.secondary:hover {
    background: #545b62;
}

.isen-plan-button.disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Plan Comparison */
.isen-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}



/* Responsive Design */
@media (max-width: 768px) {
    .isen-plans-grid {
        grid-template-columns: 1fr;
        flex-direction: column !important;
        align-items: center !important;
    }
    
    .subscription-plans-page .container {
        padding: 0 15px;
    }
    
    .isen-plan-card {
        padding: 15px;
        width: 100% !important;
        max-width: 300px !important;
    }
    
    .isen-plan-name {
        font-size: 20px;
    }
    
    .isen-plan-price {
        font-size: 24px;
    }
}

/* Plan Status Indicators */
.isen-plan-disabled {
    opacity: 0.6;
    position: relative;
}

.isen-plan-disabled::after {
    content: "DISABLED";
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dc3545;
    color: #fff;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Current Plan Indicator */
.isen-current-plan {
    border-color: #28a745;
    border-width: 2px;
    position: relative;
}

.isen-current-plan::before {
    content: "CURRENT PLAN";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #28a745;
    color: #fff;
    padding: 4px 12px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Plan Upgrade/Downgrade Options */
.isen-plan-options {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.isen-plan-options h5 {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.isen-plan-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.isen-plan-option:last-child {
    border-bottom: none;
}

.isen-plan-option-name {
    font-weight: 500;
    color: #454545;
}

.isen-plan-option-price {
    font-weight: 600;
    color: #0073aa;
}

.isen-plan-option-button {
    padding: 6px 16px;
    font-size: 12px;
    border-radius: 3px;
}

/* Loading States */
.isen-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.isen-loading::after {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   TOKEN TOP-UP SYSTEM STYLES
   ======================================== */

/* Token Top-up Container */
.isen-token-topup-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.isen-token-topup-header {
    text-align: center;
    margin-bottom: 30px;
}

.isen-token-topup-header h2 {
    color: #454545;
    margin-bottom: 10px;
}

/* Current Token Status */
.isen-current-token-status {
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.isen-current-token-status h3 {
    margin-bottom: 20px;
    color: #454545;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.isen-token-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.isen-token-info-item {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.isen-token-label {
}

.isen-token-value {
    display: block;
    font-size: 1.3em;
    font-weight: bold;
    color: #454545;
}

.isen-token-low {
    color: #dc3545;
}

/* Token Usage Bar */
.isen-token-usage-bar {
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.isen-token-usage-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.isen-token-usage-text {
    text-align: center;
    font-size: 0.9em;
    color: #666;
    margin-bottom: 20px;
}

.isen-token-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
}

.isen-token-warning h4 {
    margin: 0 0 10px 0;
    color: #856404;
}

.isen-token-warning p {
    margin: 0;
}

/* Token Purchase Section */
.isen-token-purchase-section {
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.isen-token-purchase-section h3 {
    margin-bottom: 15px;
    color: #454545;
}

.isen-token-purchase-section p {
    color: #666;
    margin-bottom: 25px;
}

.isen-token-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.isen-token-option-card {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.isen-token-option-card:hover {
    border-color: #0073aa;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.token-amount {
    margin: 15px 0 15px 0;
}

.package-price,
.isen-token-amount,
.package-description,
.isen-plan-features {
    margin-bottom: 15px;
}

.isen-token-amount strong {
    display: block;
    font-size: 1.8em;
    color: #454545;
    margin-bottom: 5px;
}

.isen-token-unit {
    font-size: 0.9em;
    color: #666;
}

.isen-token-price {
    font-size: 1.4em;
    font-weight: bold;
    color: #0073aa;
    margin-bottom: 10px;
}

.isen-token-rate {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 20px;
}

.isen-token-purchase-btn {
    background: #0073aa;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
}

.isen-token-purchase-btn:hover {
    background: #005a87;
}

.isen-token-purchase-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Custom Token Section */
.isen-custom-token-section {
    border-top: 1px solid #e9ecef;
    padding-top: 25px;
}

.isen-custom-token-section h4 {
    margin-bottom: 15px;
    color: #454545;
}

.isen-custom-token-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.isen-custom-token-form input[type="number"] {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
    width: 200px;
    text-align: center;
}

.isen-custom-price-display {
    text-align: center;
    margin: 10px 0;
}

.isen-custom-price-display span:first-child {
    font-size: 1.2em;
    font-weight: bold;
    color: #0073aa;
    margin-right: 15px;
}

.isen-custom-price-display span:last-child {
    font-size: 0.9em;
    color: #666;
}

/* Payment Security */
.isen-payment-security {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    color: #666;
}

/* Token Dashboard Styles */
.isen-token-dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.isen-token-dashboard-header {
    text-align: center;
    margin-bottom: 30px;
}

.isen-token-dashboard-header h2 {
    color: #454545;
    margin-bottom: 10px;
}

.isen-plan-overview,
.isen-token-usage-overview,
.isen-quick-actions,
.isen-purchase-history,
.isen-usage-tips {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.isen-plan-overview-grid,
.isen-usage-stats-grid,
.isen-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.isen-plan-overview-item,
.isen-usage-stat-card {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.isen-plan-label,
.isen-usage-stat-label {
    display: block;
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.isen-plan-value,
.isen-usage-stat-value {
    display: block;
    font-size: 1.2em;
    font-weight: bold;
    color: #454545;
}

.isen-usage-progress-section {
    margin: 20px 0;
}

.isen-usage-progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.9em;
    color: #666;
}

.isen-usage-progress-bar {
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.isen-usage-progress-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.isen-usage-normal { background: #28a745; }
.isen-usage-moderate { background: #ffc107; }
.isen-usage-warning { background: #fd7e14; }
.isen-usage-critical { background: #dc3545; }

.isen-usage-progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8em;
    color: #666;
}

.isen-actions-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.isen-action-card {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.isen-action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.isen-action-icon {
    font-size: 2em;
    margin-bottom: 10px;
}

.isen-action-title {
    font-weight: bold;
    margin-bottom: 8px;
    color: #454545;
}

.isen-action-description {
    font-size: 0.9em;
    color: #666;
    line-height: 1.4;
}

.isen-purchase-history-table table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.isen-purchase-history-table th,
.isen-purchase-history-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.isen-purchase-history-table th {
    background: #f8f9fa;
    font-weight: bold;
    color: #454545;
}

.isen-status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
}

.isen-status-completed { background: #d4edda; color: #155724; }
.isen-status-pending { background: #fff3cd; color: #856404; }
.isen-status-failed { background: #f8d7da; color: #721c24; }

.isen-warning {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.isen-warning-critical {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.isen-warning-high {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.isen-tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.isen-tip-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.isen-tip-item h4 {
    margin-bottom: 10px;
    color: #454545;
}

.isen-tip-item p {
    margin: 0;
    color: #666;
    line-height: 1.4;
}

/* User Subscription Dashboard Styles */
.isen-user-subscription-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.isen-dashboard-header {
    text-align: center;
    margin-bottom: 30px;
}



.isen-current-plan-section,
.isen-plan-management-section,
.isen-quick-actions-section,
.isen-subscription-history-section,
.isen-cost-savings-section,
.isen-account-info-section {
    padding: 20px;
    margin-bottom: 20px;
}

.isen-plan-status-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-top: 15px;
}

.isen-plan-status-card,
.isen-token-summary-card {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
}

.isen-plan-status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.isen-plan-status-header h4 {
    margin: 0;
    color: #454545;
    font-size: 1.2em;
}

.isen-plan-status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
}

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

.isen-plan-detail-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.isen-detail-label {
    color: #666;
    font-size: 0.9em;
}

.isen-detail-value {
    font-weight: bold;
    color: #454545;
}

.isen-token-summary-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.isen-token-stat {
    text-align: center;
}

.isen-token-stat-value {
    display: block;
    font-size: 1.5em;
    font-weight: bold;
    color: #454545;
}

.isen-token-stat-label {
    font-size: 0.8em;
    color: #666;
}

.isen-token-progress-bar {
    height: 12px;
    background: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}

.isen-token-progress-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.isen-token-progress-text {
    text-align: center;
    font-size: 0.8em;
    color: #666;
}

.isen-plan-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.isen-plan-option-card {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #0073aa;
}

.isen-upgrade-option {
    border-left-color: #28a745;
}

.isen-downgrade-option {
    border-left-color: #ffc107;
}

.isen-plan-option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.isen-plan-option-header h5 {
    margin: 0;
    color: #454545;
}

.isen-plan-price {
}

.isen-plan-option-features {
    margin-bottom: 20px;
}

.isen-plan-feature {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.isen-feature-icon {
    margin-right: 8px;
    font-size: 1.1em;
}

.isen-action-btn {
    display: inline-block;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    transition: all 0.2s ease;
}

.isen-upgrade-btn {
    background: #28a745;
    color: white;
}

.isen-upgrade-btn:hover {
    background: #218838;
    color: white;
}

.isen-downgrade-btn {
    background: #ffc107;
    color: #212529;
}

.isen-downgrade-btn:hover {
    background: #e0a800;
    color: #212529;
}

.isen-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.isen-action-card {
    display: flex;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.isen-action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.isen-action-icon {
    font-size: 2em;
    margin-right: 15px;
}

.isen-action-content h4 {
    margin: 0 0 5px 0;
    color: #454545;
}

.isen-action-content p {
    margin: 0;
    color: #666;
    font-size: 0.9em;
    line-height: 1.4;
}

.isen-history-table table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.isen-history-table th,
.isen-history-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.isen-history-table th {
    background: #f8f9fa;
    font-weight: bold;
    color: #454545;
}

.isen-change-type-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
}

.isen-change-upgrade { background: #d4edda; color: #155724; }
.isen-change-downgrade { background: #fff3cd; color: #856404; }
.isen-change-switch { background: #d1ecf1; color: #0c5460; }

.isen-cost-savings-card {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 20px;
    border-radius: 6px;
    text-align: center;
}

.isen-cost-savings-card h4 {
    margin: 0 0 10px 0;
    font-size: 1.2em;
}

.isen-account-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.isen-account-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.isen-info-label {
    color: #666;
    font-size: 0.9em;
}

.isen-info-value {
    font-weight: bold;
    color: #454545;
}

.isen-status-active {
    color: #28a745;
}

.isen-no-other-plans {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
    .isen-token-info-grid,
    .isen-token-options-grid,
    .isen-plan-overview-grid,
    .isen-usage-stats-grid,
    .isen-actions-grid,
    .isen-plan-status-grid,
    .isen-plan-options-grid,
    .isen-account-info-grid {
        grid-template-columns: 1fr;
    }
    
    .isen-tips-grid {
        grid-template-columns: 1fr;
    }
    
    .isen-custom-token-form input[type="number"] {
        width: 100%;
        max-width: 300px;
    }
}