/* Account Page Styles */

:root {
  --feature-red: rgb(145, 68, 56);
  --feature-red-dark: rgb(120, 50, 40);
  --feature-red-light: rgb(200, 100, 80);
  --feature-red-80: rgba(145, 68, 56, 0.8);
}
  
/* Tab Navigation */
.tab-navigation {
  display: flex;
  border-bottom: 2px solid #e5e7eb;
  margin-bottom: 20px;
}

.tab-button {
  padding: 12px 24px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  color: #6b7280;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

.tab-button:hover {
  color: #374151;
  background-color: #f9fafb;
}

.tab-button.active {
  color: var(--feature-red);
  border-bottom-color: var(--feature-red);
  background-color: #f8fafc;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Subscription Cards */
.subscription-cards-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 20px 0;
}

.subscription-card {
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  position: relative;
  background: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  min-height: 400px; /* Ensure minimum height for alignment */
}

.subscription-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Badges and Ribbons */
.popular-badge {
  position: absolute;
  top: -10px;
  right: 20px;
  background: #f59e0b;
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
  z-index: 1; /* Lower than upcoming ribbon */
}

.selected-ribbon {
  position: absolute;
  top: -10px;
  left: 20px;
  background: #10b981;
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
  z-index: 1;
}

/* Plan Header */
.plan-header {
  margin-bottom: 15px;
}

.plan-title {
  margin: 0;
  color: #1f2937;
  font-size: 20px;
  font-weight: 600;
}

.plan-description {
  margin: 5px 0;
  color: #6b7280;
  font-size: 14px;
}

.plan-price {
  margin: 12px 0;
  text-align: center;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.price-amount {
  font-size: 32px;
  font-weight: 900;
  color: #1f2937;
  display: block;
  margin-bottom: 4px;
}

.price-period {
  font-size: 14px;
  color: #6b7280;
  text-transform: capitalize;
  font-weight: 500;
}

/* Plan Permissions */
.plan-permissions {
  margin: 15px 0;
  flex-grow: 1; /* Allow permissions to grow and push button to bottom */
}

.permissions-title {
  margin: 0 0 10px 0;
  color: #374151;
  font-size: 14px;
  font-weight: 600;
}

.permissions-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.permission-category {
  margin: 4px 0;
  padding: 0;
  background: none;
  border: none;
  list-style: disc;
  margin-left: 15px;
}

.category-name {
  color: #1f2937;
  font-size: 13px;
  font-weight: 600;
  list-style: disc;
  margin-left: 0;
  text-transform: capitalize;
}

.permission-details {
  list-style: disc;
  margin: 3px 0 0 15px;
  padding: 0;
}

.permission-item {
  margin: 2px 0;
  color: #4b5563;
  font-size: 12px;
}

/* Plan Actions */
.plan-actions {
  margin-top: auto; /* Push button to bottom of card */
  text-align: center;
  padding-top: 15px;
  border-top: 1px solid #e5e7eb;
  margin-top: 20px;
}

.subscribe-button {
  width: auto;
  min-width: 120px;
  font-size: 12px;
  padding: 8px 20px;
  display: inline-block;
  margin-bottom: 0px !important;
}

/* Responsive Action Buttons Grid */
.action-buttons-grid {
  display: flex;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
  justify-content: center;
}

.action-btn {
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
  text-align: center;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Button Styles */
.view-btn {
  background: white;
  color: #374151;
  border-color: #d1d5db;
}

.view-btn:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.edit-btn {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.edit-btn:hover {
  background: #2563eb;
  border-color: #2563eb;
}

.delete-btn {
  background: white;
  color: #ef4444;
  border-color: #ef4444;
  grid-column: 1 / -1; /* Span full width on second row */
}

.delete-btn:hover {
  background: #ef4444;
  color: white;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .action-buttons-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  
  .delete-btn {
    grid-column: 1; /* Reset to single column on very small screens */
  }
  
  .action-btn {
    font-size: 11px;
    padding: 6px 10px;
    min-height: 32px;
  }
}

@media (min-width: 481px) and (max-width: 640px) {
  .action-buttons-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  
  .action-btn {
    font-size: 11px;
    padding: 7px 10px;
    min-height: 34px;
  }
}

.current-plan-button {
  background: #9ca3af;
  color: white;
  cursor: not-allowed;
  font-size: 12px;
  padding: 8px 20px;
  width: auto;
  min-width: 120px;
  display: inline-block;
}

/* Subscription Status */
.status-active {
  color: #10b981;
  font-weight: bold;
}

.status-expired {
  color: #ef4444;
  font-weight: bold;
}

.status-pending {
  color: #f59e0b;
  font-weight: bold;
}

/* Subscription Details */
.subscription-details p {
  margin: 8px 0;
}

/* Subscription History Table */
.subscription-history {
  margin-top: 30px;
}

.table-container {
  overflow-x: auto;
  margin-top: 15px;
}

.subscription-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #e5e7eb;
}

.subscription-table thead tr {
  background: #f9fafb;
}

.subscription-table th {
  padding: 12px;
  text-align: left;
  border: 1px solid #e5e7eb;
  font-weight: 600;
  color: #374151;
}

.subscription-table td {
  padding: 12px;
  border: 1px solid #e5e7eb;
}

.subscription-table tbody tr.active-subscription {
  background: #f0fdf4;
}

/* Expired Subscriptions */
.expired-subscriptions {
  margin-top: 15px;
}

.expired-subscription-item {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  margin: 12px 0;
  background-color: #f9fafb;
}

.expired-subscription-item p {
  margin: 4px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .subscription-cards-container {
    grid-template-columns: 1fr;
  }
  
  .tab-navigation {
    flex-direction: column;
  }
  
  .tab-button {
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    border-right: none;
  }
  
  .tab-button.active {
    border-bottom-color: #e5e7eb;
    border-left: 3px solid #3b82f6;
  }
}

@media (max-width: 1024px) {
  .subscription-cards-container {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  overflow-y: auto;
  overflow-x: hidden;
}

/* Payment Processing Notification */
.payment-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  max-width: 400px;
  animation: slideInRight 0.3s ease-out;
}

.notification-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.notification-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.notification-text {
  flex: 1;
  font-size: 14px;
  color: #856404;
  line-height: 1.4;
}

.notification-close {
  background: none;
  border: none;
  font-size: 18px;
  color: #856404;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notification-close:hover {
  color: #6c5ce7;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.modal-content h3 {
  margin: 0 0 15px 0;
  font-size: 20px;
  font-weight: 600;
}

.modal-message {
  margin: 15px 0 25px 0;
  line-height: 1.5;
  color: #374151;
}

.modal-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

/* Modal Icon Styles */
.success-icon {
  color: #10b981;
}

.error-icon {
  color: #ef4444;
}

.info-icon {
  color: #3b82f6;
}

/* Billing cycle choice modal styles */
.choice-title { font-size: 24px; font-weight: 700; text-align: center; margin: 0 0 6px 0; }
.choice-subtitle { text-align: center; color: #374151; margin-bottom: 18px; }
.option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 8px 0 10px; }
.option-card { border: 2px solid #e5e7eb; border-radius: 10px; padding: 14px; cursor: pointer; transition: all .15s ease; background: #fff; }
.option-card:hover { border-color: #11182733; box-shadow: 0 4px 12px rgba(0,0,0,.06); }
.option-card.active { border-color: #111827; box-shadow: 0 6px 16px rgba(0,0,0,.1); }
.option-header { display:flex; align-items:center; justify-content:space-between; margin-bottom: 6px; }
.option-name { font-weight: 600; font-size: 14px; color:#111827; }
.option-price { font-weight: 700; font-size: 18px; color:#111827; }
.option-caption { color:#6b7280; font-size: 12px; }
.choice-actions { display:flex; justify-content:flex-end; gap:10px; margin-top: 14px; }
.btn-disabled { opacity: .6; cursor: not-allowed; }

/* Billing cycle toggle */
.cycle-toggle { display: inline-flex; background: #f3f4f6; border: 1px solid var(--feature-red); border-radius: 9999px; padding: 4px; gap: 4px; }
.cycle-btn { border-radius: 9999px; padding: 6px 14px; font-weight: 600; color: #374151; background: transparent; border: none; cursor: pointer; transition: all 0.3s ease; }
.cycle-btn.active { background: var(--feature-red); color: #fff; }
.price-highlight { font-weight: 700; }

/* Notices Tab Styles */
#admin-notices {
  padding: 8px
}


/* Bug Report Form */
#bug-report-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bug-report-intro {
  color: #666;
  margin-bottom: 16px;
}

#bug-subject,
#bug-device {
  width: 100%;
}

#bug-description {
  width: 100%;
  min-height: 120px;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
}

#bug-report-message {
  padding: 12px;
  border-radius: 4px;
  margin-top: 8px;
}

/* Contact & Support Section */
.contact-box {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  padding: 16px;
  border-radius: 4px;
}

.contact-box h3 {
  margin-top: 0;
  color: #374151;
}

.contact-item {
  margin-bottom: 16px;
}

.contact-item p {
  margin: 8px 0;
}

.contact-item a {
  color: var(--feature-red);
  text-decoration: none;
}

.contact-item a:hover {
  text-decoration: underline;
}

.contact-description {
  color: #6b7280;
  font-size: 14px;
  margin: 8px 0;
}

/* Primary Buttons - Feature Red */
.button.primary {
  background-color: var(--feature-red);
  border-color: var(--feature-red);
  color: white;
  transition: all 0.3s ease;
}

.button.primary:hover {
  background-color: var(--feature-red-dark);
  border-color: var(--feature-red-dark);
}

.button.primary:active {
  background-color: var(--feature-red-dark);
}

/* Outline Buttons - Account Page */
.button.outline-medium {
  border-color: var(--feature-red);
  color: var(--feature-red);
}

.button.outline-medium:hover {
  background-color: var(--feature-red);
  color: white;
}

.button.outline {
  border-color: var(--feature-red);
  color: var(--feature-red);
}

.button.outline:hover {
  background-color: var(--feature-red);
  color: white;
}

/* Subscription Details Toggle */
#subscription-details {
  transition: max-height 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}

#subscription-details[style*="display: block"] {
  opacity: 1;
}

#toggle-details-btn {
  transition: all 0.2s ease;
}

#toggle-details-btn:hover {
  transform: translateY(-1px);
}

#toggle-details-icon {
  transition: transform 0.3s ease;
}
