/* Plan Management Styles */

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

.resource-card {
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  gap: 15px;
  transition: all 0.3s;
}

.resource-card:hover {
  border-color: var(--primary, #00a149);
  box-shadow: 0 4px 12px rgba(0, 161, 73, 0.1);
}

.resource-card.resource-warning {
  border-color: #e74c3c;
  background: #fff5f5;
}

.resource-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #00a149 0%, #319131 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: white;
  flex-shrink: 0;
}

.resource-card.resource-warning .resource-icon {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.resource-info {
  flex: 1;
}

.resource-info h4 {
  margin: 0 0 10px 0;
  font-size: 16px;
  color: #333;
}

.resource-usage {
  font-size: 24px;
  font-weight: bold;
  color: #333;
  margin-bottom: 10px;
}

.usage-separator {
  color: #999;
  margin: 0 5px;
}

.usage-limit {
  color: #666;
}

.progress-bar {
  height: 8px;
  background: #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  transition: width 0.3s, background 0.3s;
  border-radius: 4px;
}

.resource-percentage {
  font-size: 12px;
  color: #666;
}

/* Add-ons Grid */
.addons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.addon-card {
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}

.addon-card:hover {
  border-color: var(--primary, #00a149);
  box-shadow: 0 4px 12px rgba(0, 161, 73, 0.15);
  transform: translateY(-2px);
}

.addon-header {
  background: linear-gradient(135deg, #00a149 0%, #319131 100%);
  padding: 20px;
  text-align: center;
  border-bottom: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 140px;
}

.addon-icon {
  width: 70px;
  height: 70px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: white;
  margin: 0 auto 10px;
  border: 2px dashed rgba(255, 255, 255, 0.4);
}

.addon-header h3 {
  margin: 0;
  font-size: 18px;
  color: white;
  font-weight: 600;
}

.addon-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.addon-price {
  font-size: 24px;
  font-weight: bold;
  color: white;
  background: #00a149;
  padding: 8px 16px;
  border-radius: 20px;
  margin-bottom: 15px;
  text-align: center;
  display: block;
}

.price-unit {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: normal;
  display: block;
  margin-top: 2px;
}

.addon-description {
  color: #666;
  font-size: 13px;
  text-align: center;
  margin-bottom: 15px;
  min-height: auto;
  line-height: 1.4;
}

.addon-quantity {
  margin-bottom: 15px;
  margin-top: auto;
}

.addon-quantity label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 13px;
  text-align: center;
}

.quantity-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.btn-quantity {
  width: 36px;
  height: 36px;
  border: 2px solid #e0e0e0;
  background: white;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #666;
  font-weight: bold;
}

.btn-quantity:hover {
  border-color: var(--primary, #00a149);
  background: #f0fff5;
  color: var(--primary, #00a149);
}

.quantity-selector input {
  width: 60px;
  height: 36px;
  text-align: center;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  color: #333;
}

.quantity-selector input:focus {
  outline: none;
  border-color: var(--primary, #00a149);
}

/* Shopping Cart */
.shopping-cart {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 400px;
  max-height: 500px;
  background: white;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  z-index: 1000;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.cart-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.cart-header {
  padding: 20px;
  border-bottom: 2px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #00a149 0%, #319131 100%);
  color: white;
}

.cart-header h3 {
  margin: 0;
  font-size: 18px;
}

.btn-close-cart {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  padding: 5px;
  transition: transform 0.3s;
}

.btn-close-cart:hover {
  transform: rotate(90deg);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  max-height: 300px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 10px;
}

.cart-item-info h4 {
  margin: 0 0 5px 0;
  font-size: 14px;
  color: #333;
}

.cart-item-info p {
  margin: 0;
  font-size: 12px;
  color: #666;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.cart-item-subtotal {
  font-weight: bold;
  color: #00a149;
}

.btn-remove-item {
  background: none;
  border: none;
  color: #e74c3c;
  cursor: pointer;
  padding: 5px;
  transition: all 0.3s;
}

.btn-remove-item:hover {
  transform: scale(1.2);
}

.cart-footer {
  padding: 20px;
  border-top: 2px solid #e0e0e0;
  background: #f8f9fa;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  font-size: 18px;
}

.cart-total strong {
  color: #00a149;
  font-size: 24px;
}

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

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

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

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

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

/* Responsive */
@media (max-width: 768px) {
  .resources-grid {
    grid-template-columns: 1fr;
  }

  .addons-grid {
    grid-template-columns: 1fr;
  }

  .shopping-cart {
    width: 100%;
    max-width: 100%;
  }
}

/* Payment Method Selection */
.payment-methods {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.payment-method {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s;
  background: white;
}

.payment-method:hover {
  border-color: #00a149;
  background: #f0fff5;
  transform: translateX(5px);
}

.payment-method .payment-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #00a149;
  background: #e6f7ed;
  border-radius: 10px;
  flex-shrink: 0;
}

.payment-method .payment-info {
  flex: 1;
}

.payment-method .payment-info h3 {
  margin: 0 0 5px 0;
  font-size: 18px;
  color: #333;
}

.payment-method .payment-info p {
  margin: 0;
  font-size: 14px;
  color: #666;
}

.payment-method > .fa-chevron-right {
  color: #999;
  font-size: 18px;
}

.payment-method:hover > .fa-chevron-right {
  color: #00a149;
}

/* Alert Styles */
.alert {
  padding: 15px 20px;
  border-radius: 8px;
  margin: 20px 0;
}

.alert-warning {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffc107;
}

.alert-warning i {
  margin-right: 10px;
}

.alert-warning p {
  margin: 5px 0;
}

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

.alert-error i {
  margin-right: 10px;
}

/* Loading Spinner */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: #666;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #00a149;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

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