/* Feature Access Control Styles */

/* Upgrade Prompt Modal */
.upgrade-prompt-content {
  text-align: center;
  padding: 20px 0;
}

.feature-lock-icon {
  font-size: 48px;
  color: #ffc107;
  margin-bottom: 20px;
}

.upgrade-prompt-content h5 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #333;
}

.upgrade-prompt-content p {
  font-size: 16px;
  color: #666;
  margin-bottom: 25px;
}

/* Plan Comparison */
.current-vs-required {
  margin: 25px 0;
}

.plan-comparison {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 25px;
}

.current-plan, .required-plan {
  flex: 1;
  text-align: center;
  padding: 15px;
  border-radius: 8px;
  background: #f8f9fa;
}

.current-plan {
  border: 2px solid #e9ecef;
}

.required-plan {
  border: 2px solid #007bff;
  background: linear-gradient(135deg, #007bff10, #007bff05);
}

.plan-comparison h6 {
  font-size: 12px;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 5px;
  font-weight: 600;
}

.plan-name {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: #333;
  margin-bottom: 5px;
}

.plan-price {
  display: block;
  font-size: 14px;
  color: #007bff;
  font-weight: 600;
}

.upgrade-arrow {
  font-size: 20px;
  color: #007bff;
}

/* Upgrade Benefits */
.upgrade-benefits {
  text-align: left;
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin-top: 20px;
}

.upgrade-benefits h6 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 15px;
  color: #333;
}

.upgrade-benefits ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.upgrade-benefits li {
  padding: 8px 0;
  padding-left: 25px;
  position: relative;
  color: #555;
}

.upgrade-benefits li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #28a745;
  font-weight: bold;
  font-size: 16px;
}

/* Billing Modal */
.billing-upgrade-content {
  text-align: center;
}

.plan-summary {
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
  padding: 30px;
  border-radius: 12px;
  margin-bottom: 30px;
}

.plan-summary h5 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 15px;
}

.price-display {
  font-size: 36px;
  font-weight: 700;
}

.price-display .period {
  font-size: 18px;
  font-weight: 400;
  opacity: 0.8;
}

.billing-options {
  text-align: center;
}

.contact-options {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
}

.contact-options .btn {
  flex: 1;
  max-width: 200px;
}

/* Feature Lock States */
.feature-locked {
  position: relative;
  opacity: 0.6;
  pointer-events: none;
}

.feature-locked::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(2px);
  border-radius: 8px;
  z-index: 1;
}

.feature-lock-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  text-align: center;
  color: #666;
}

.feature-lock-overlay i {
  font-size: 24px;
  margin-bottom: 10px;
  color: #ffc107;
}

.feature-lock-overlay p {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.feature-lock-overlay .btn {
  margin-top: 10px;
  font-size: 12px;
  padding: 5px 15px;
}

/* Subscription Status Indicator */
.subscription-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.subscription-status.trial {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.subscription-status.active {
  background: #d1e7dd;
  color: #0f5132;
  border: 1px solid #badbcc;
}

.subscription-status.overdue {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.subscription-status.suspended {
  background: #e2e3e5;
  color: #41464b;
  border: 1px solid #d6d8db;
}

/* Plan Card */
.plan-card {
  background: white;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  padding: 25px;
  text-align: center;
  position: relative;
  transition: all 0.3s ease;
}

.plan-card:hover {
  border-color: #007bff;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 123, 255, 0.15);
}

.plan-card.current {
  border-color: #28a745;
  background: linear-gradient(135deg, #28a74505, #28a74502);
}

.plan-card.recommended {
  border-color: #007bff;
  background: linear-gradient(135deg, #007bff05, #007bff02);
}

.plan-card .badge {
  position: absolute;
  top: -10px;
  right: 20px;
  background: #007bff;
  color: white;
  padding: 5px 15px;
  border-radius: 15px;
  font-size: 11px;
  font-weight: 600;
}

.plan-card .plan-name {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #333;
}

.plan-card .plan-price {
  font-size: 36px;
  font-weight: 700;
  color: #007bff;
  margin-bottom: 5px;
}

.plan-card .plan-period {
  font-size: 14px;
  color: #666;
  margin-bottom: 20px;
}

.plan-features {
  text-align: left;
  margin: 20px 0;
}

.plan-features li {
  padding: 8px 0;
  padding-left: 25px;
  position: relative;
  color: #555;
  font-size: 14px;
}

.plan-features li.included:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #28a745;
  font-weight: bold;
}

.plan-features li.not-included:before {
  content: "✗";
  position: absolute;
  left: 0;
  color: #dc3545;
  font-weight: bold;
}

.plan-features li.not-included {
  opacity: 0.5;
}

/* Usage Indicators */
.usage-indicator {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 15px;
  margin: 15px 0;
}

.usage-indicator h6 {
  margin: 0 0 10px 0;
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

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

.usage-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #28a745, #20c997);
  border-radius: 10px;
  transition: width 0.3s ease;
}

.usage-progress-bar.warning {
  background: linear-gradient(90deg, #ffc107, #fd7e14);
}

.usage-progress-bar.danger {
  background: linear-gradient(90deg, #dc3545, #c82333);
}

.usage-text {
  font-size: 12px;
  color: #666;
  text-align: right;
}

/* Feature Access Notifications */
.feature-access-notification {
  background: linear-gradient(135deg, #007bff15, #007bff05);
  border: 1px solid #007bff;
  border-radius: 8px;
  padding: 15px;
  margin: 15px 0;
  position: relative;
}

.feature-access-notification .notification-icon {
  position: absolute;
  top: 15px;
  left: 15px;
  color: #007bff;
  font-size: 18px;
}

.feature-access-notification .notification-content {
  margin-left: 40px;
}

.feature-access-notification h6 {
  margin: 0 0 5px 0;
  color: #333;
  font-weight: 600;
}

.feature-access-notification p {
  margin: 0;
  color: #666;
  font-size: 14px;
}

.feature-access-notification .btn {
  margin-top: 10px;
  font-size: 12px;
}

/* Feature Gates Additional Styles */

/* Navigation Lock States */
.nav-locked {
  opacity: 0.6;
  pointer-events: all !important; /* Allow clicks for upgrade prompts */
  cursor: pointer;
}

.nav-lock-icon {
  margin-left: 8px;
  font-size: 12px;
  color: #ffc107;
}

/* Feature Disabled States */
.feature-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.limit-indicator {
  margin-left: 8px;
  color: #dc3545;
  font-size: 12px;
}

/* Subscription Status Indicator */
.subscription-status-indicator {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
}

.subscription-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 25px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.trial-icon {
  color: #ffc107;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* Feature Access Banner */
.feature-access-banner {
  margin: 0 0 20px 0;
  border-radius: 8px;
  border: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.banner-content {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px 0;
}

.banner-content i {
  font-size: 18px;
}

.banner-content span {
  flex: 1;
  font-weight: 500;
}

.banner-content .btn {
  white-space: nowrap;
}

/* Enhanced Feature Lock Overlay */
.feature-lock-overlay {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(3px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 8px;
  border: 2px dashed #e9ecef;
}

.feature-lock-overlay i {
  font-size: 32px;
  color: #ffc107;
  margin-bottom: 10px;
}

.feature-lock-overlay p {
  margin: 0;
  text-align: center;
  color: #666;
}

.feature-lock-overlay p:first-of-type {
  font-weight: 600;
  color: #333;
  font-size: 16px;
}

/* Usage Progress Indicators */
.usage-warning {
  background: linear-gradient(135deg, #fff3cd, #ffeaa7);
  border: 1px solid #ffc107;
  border-radius: 8px;
  padding: 12px 16px;
  margin: 10px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.usage-warning i {
  color: #856404;
  font-size: 16px;
}

.usage-warning span {
  color: #856404;
  font-weight: 500;
}

/* Tier Badge Enhancements */
.tier-badge {
  position: relative;
  overflow: hidden;
}

.tier-badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.tier-badge:hover::before {
  left: 100%;
}

/* Subscription Cards */
.subscription-card {
  background: white;
  border: 2px solid #e9ecef;
  border-radius: 16px;
  padding: 25px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.subscription-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #007bff, #0056b3);
  opacity: 0;
  transition: opacity 0.3s;
}

.subscription-card:hover {
  border-color: #007bff;
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 123, 255, 0.15);
}

.subscription-card:hover::before {
  opacity: 1;
}

.subscription-card.current {
  border-color: #28a745;
  background: linear-gradient(135deg, #f8fff9, #ffffff);
}

.subscription-card.current::before {
  background: linear-gradient(90deg, #28a745, #20c997);
  opacity: 1;
}

.subscription-card .badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #007bff;
  color: white;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.subscription-card .plan-name {
  font-size: 24px;
  font-weight: 700;
  margin: 15px 0 10px;
  color: #333;
}

.subscription-card .plan-price {
  font-size: 32px;
  font-weight: 700;
  color: #007bff;
  margin-bottom: 5px;
}

.subscription-card .plan-period {
  font-size: 14px;
  color: #666;
  margin-bottom: 25px;
}

/* Feature List Styling */
.feature-list {
  text-align: left;
  margin: 20px 0;
}

.feature-list li {
  padding: 10px 0;
  padding-left: 30px;
  position: relative;
  border-bottom: 1px solid #f8f9fa;
  color: #555;
}

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

.feature-list li.featured {
  background: linear-gradient(135deg, #007bff05, #ffffff);
  border-radius: 6px;
  margin: 2px 0;
  padding: 12px 0 12px 30px;
}

.feature-list li::before {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: bold;
  font-size: 14px;
}

.feature-list li.included::before {
  content: "✓";
  color: #28a745;
}

.feature-list li.not-included::before {
  content: "✗";
  color: #dc3545;
}

.feature-list li.not-included {
  opacity: 0.5;
  text-decoration: line-through;
}

/* Animated Elements */
.feature-pulse {
  animation: featurePulse 3s ease-in-out infinite;
}

@keyframes featurePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Billing Enforcement Styles */

/* Billing Warning Banner */
.billing-warning {
  margin: 0 0 20px 0;
  border-radius: 8px;
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.billing-warning-content {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 20px;
}

.billing-warning-content i {
  font-size: 20px;
  color: #856404;
}

.billing-warning-content span {
  flex: 1;
  font-weight: 500;
  color: #856404;
}

.billing-warning-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.billing-warning-actions .btn {
  white-space: nowrap;
  font-size: 12px;
  padding: 6px 12px;
}

/* Read-Only Mode Banner */
.readonly-banner {
  background: linear-gradient(135deg, #f8d7da, #f5c6cb);
  border: 1px solid #dc3545;
  color: #721c24;
  margin: 0 0 20px 0;
  border-radius: 8px;
  animation: slideDown 0.3s ease-out;
}

.readonly-content {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 20px;
}

.readonly-content i {
  font-size: 20px;
  color: #721c24;
}

.readonly-content span {
  flex: 1;
  font-weight: 600;
}

/* Billing Restricted Elements */
.billing-restricted {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.billing-restricted::after {
  content: " (Billing Required)";
  font-size: 11px;
  color: #dc3545;
  font-weight: normal;
}

/* Billing Status Indicators */
.billing-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.billing-status.status-trial {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.billing-status.status-active {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

.billing-status.status-grace {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
  animation: pulse 2s infinite;
}

.billing-status.status-overdue {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  animation: pulse 2s infinite;
}

.billing-status.status-suspended {
  background: #e2e3e5;
  color: #41464b;
  border: 1px solid #d6d8db;
}

/* Billing Help Modal */
.billing-help-content h5 {
  color: #333;
  margin-bottom: 15px;
}

.billing-help-content p {
  color: #666;
  margin-bottom: 15px;
}

.billing-help-content ul {
  color: #555;
  margin-bottom: 25px;
}

.billing-help-content li {
  margin-bottom: 8px;
}

.billing-help-content li strong {
  color: #333;
}

.contact-options {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
}

.contact-options h6 {
  color: #333;
  margin-bottom: 10px;
}

.contact-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 15px;
}

.contact-buttons .btn {
  flex: 1;
  max-width: 180px;
}

/* Billing Status Timeline */
.billing-timeline {
  position: relative;
  padding: 20px 0;
}

.billing-timeline::before {
  content: '';
  position: absolute;
  left: 30px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e9ecef;
}

.billing-timeline-item {
  position: relative;
  padding: 15px 0 15px 70px;
  margin-bottom: 20px;
}

.billing-timeline-item::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 20px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #007bff;
  border: 3px solid white;
  box-shadow: 0 0 0 2px #007bff;
}

.billing-timeline-item.current::before {
  background: #28a745;
  box-shadow: 0 0 0 2px #28a745;
  animation: pulse 2s infinite;
}

.billing-timeline-item.warning::before {
  background: #ffc107;
  box-shadow: 0 0 0 2px #ffc107;
}

.billing-timeline-item.error::before {
  background: #dc3545;
  box-shadow: 0 0 0 2px #dc3545;
}

.billing-timeline-content h6 {
  margin: 0 0 5px 0;
  color: #333;
  font-weight: 600;
}

.billing-timeline-content p {
  margin: 0;
  color: #666;
  font-size: 14px;
}

.billing-timeline-date {
  font-size: 12px;
  color: #999;
  margin-top: 5px;
}

/* Grace Period Warning */
.grace-period-warning {
  background: linear-gradient(135deg, #fff3cd, #ffeaa7);
  border: 2px solid #ffc107;
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
  text-align: center;
  animation: gracePeriodPulse 3s ease-in-out infinite;
}

@keyframes gracePeriodPulse {
  0%, 100% { border-color: #ffc107; }
  50% { border-color: #fd7e14; }
}

.grace-period-warning h5 {
  color: #856404;
  margin-bottom: 10px;
  font-weight: 700;
}

.grace-period-warning p {
  color: #856404;
  margin-bottom: 15px;
}

.grace-period-countdown {
  font-size: 24px;
  font-weight: 700;
  color: #fd7e14;
  margin: 15px 0;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .plan-comparison {
    flex-direction: column;
    gap: 15px;
  }
  
  .upgrade-arrow {
    transform: rotate(90deg);
  }
  
  .contact-options {
    flex-direction: column;
  }
  
  .contact-options .btn {
    max-width: none;
  }
  
  .subscription-status-indicator {
    position: relative;
    top: auto;
    right: auto;
    margin: 10px;
    text-align: center;
  }
  
  .banner-content {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
  
  .banner-content .btn {
    width: 100%;
  }
  
  .subscription-card {
    margin-bottom: 20px;
  }
}