/* © 2026 HumanWidget. All Rights Reserved. */

:root {
  --primary-color: #bd7bff;
  --primary-hover: #a753fb;
  --secondary-color: #4b5563;
  --success-color: #10b981;
  --error-color: #ef4444;
  --background-color: #f3f4f6;
  --card-background: #ffffff;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --font-family: "Inter", sans-serif;
}

body {
  margin: 0;
  font-family: var(--font-family);
  background-color: var(--background-color);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.background-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 300px;
  background: linear-gradient(to bottom, var(--primary-color), #bd7bff);
  z-index: 0;
}

.subscription-wrapper {
  display: flex;
  align-items: center; /* This vertically centers the content */
  justify-content: center; /* This horizontally centers the content */
  min-height: 100vh; /* Ensures the wrapper takes up the full screen height */
  padding: 20px;
  z-index: 2;
}

.subscription-container {
  background: var(--card-background);
  border-radius: 16px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  padding: 30px;
  max-width: 750px; /* Increased from the default */
  width: 95%;
  text-align: center;
  overflow: hidden;
  z-index: 1;
}

.state-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.icon-wrapper {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f3f4f6;
  color: var(--primary-color);
  margin-bottom: 24px;
}

.icon-wrapper.active {
  background-color: #d1fae5;
  color: var(--success-color);
}

h2 {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 12px;
}

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

.feature-description,
.trial-info {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 24px;
}

.features-list {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  text-align: left;
  align-self: flex-start;
}

.features-list li {
  font-size: 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
}

.features-list li::before {
  content: "✓";
  color: var(--success-color);
  font-weight: bold;
  margin-right: 12px;
}

.cta-button,
.secondary-button,
.dashboard-link {
  width: 100%;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  text-decoration: none;
  display: inline-block;
  box-sizing: border-box;
}

.cta-button {
  background-color: var(--primary-color);
  color: white;
}

.cta-button:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.cta-button:disabled {
  background-color: #d1d5db;
  cursor: not-allowed;
}

.secondary-button,
.dashboard-link {
  background-color: transparent;
  color: var(--text-primary);
  border-color: #d1d5db;
  margin-top: 12px;
}

.secondary-button:hover,
.dashboard-link:hover {
  background-color: #f9fafb;
  border-color: #9ca3af;
}

.secondary-button.danger {
  color: var(--error-color);
  border-color: var(--error-color);
}
.secondary-button.danger:hover {
  background-color: #fef2f2;
}

.button-group {
  width: 100%;
  margin-top: 12px;
}
.button-group .secondary-button {
  margin-top: 0;
  margin-bottom: 12px;
}

.details-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px 24px;
  text-align: left;
  width: 100%;
  margin: 24px 0;
  font-size: 16px;
}

.details-grid div:nth-child(odd) {
  font-weight: 500;
  color: var(--text-secondary);
}

.details-grid div:nth-child(even) {
  font-weight: 600;
  text-align: right;
}

.status-badge {
  padding: 4px 12px;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  justify-self: end;
}
.status-badge.active,
.status-badge.trialing {
  background-color: #d1fae5;
  color: #065f46;
}
.status-badge.past_due {
  background-color: #fef3c7;
  color: #92400e;
}
.status-badge.canceled,
.status-badge.paused {
  background-color: #e5e7eb;
  color: #4b5563;
}

.error-text {
  color: var(--error-color);
  margin: 12px 0 24px;
}

.spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border-left-color: var(--primary-color);
  animation: spin 1s ease infinite;
  margin-bottom: 24px;
}

.subscription-footer {
  margin-top: 32px;
  font-size: 14px;
  color: var(--text-secondary);
}

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

.plan-options-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  width: 100%;
  max-width: 700px;
  margin: 30px 0;
}

.plan-card {
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 25px;
  text-align: left;
  display: flex;
  flex-direction: column;
  background-color: #fff;
  position: relative;
}

.plan-card.recommended {
  border-color: var(--primary-color);
  border-width: 2px;
}

.recommended-badge {
  position: absolute;
  top: -12px;
  right: 20px;
  background-color: var(--primary-color);
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75em;
  font-weight: 600;
}

.plan-name {
  font-size: 1.5em;
  font-weight: 600;
  margin: 0 0 5px 0;
}

.plan-price {
  font-size: 1.1em;
  color: #6b7280;
  margin: 0 0 20px 0;
}

/* Styles for the Plan Feature Lists */
.plan-card .features-list {
  /* Remove default padding and bullets */
  list-style: none;
  padding-left: 0;
  margin: 0 0 25px 0;
  flex-grow: 1;
}

.plan-card .features-list li {
  /* Flexbox properties removed to allow normal text flow */
  margin-bottom: 12px;
  font-size: 0.9em;
  color: #4b5563;
  line-height: 1.4;
  padding-left: 28px; /* Keeps space for the checkmark */
  position: relative; /* For positioning the checkmark */
}

/* This rule for the checkmark is correct and can stay */
.plan-card .features-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  color: #34d399; /* A nice green */
  font-size: 20px;
  font-weight: bold;
}

.plan-card .features-list li strong {
  font-weight: 600;
  color: #1f2937;
  margin-right: 7px;
}

.plan-card .cta-button {
  width: 100%;
}

.plan-card .cta-button:disabled {
  background-color: #6b7280;
  cursor: not-allowed;
}

.plan-card.enterprise-card {
  grid-column: 1 / -1; /* This makes the card span both columns */
  background-color: #f7f9fc;
  border-color: #e7eaf3;
  text-align: center;
}

.plan-card.enterprise-card .features-list {
  text-align: center;
  align-self: center; /* Center the list items */
  margin-bottom: 25px;
}

.plan-card.enterprise-card .plan-description {
  margin-bottom: 20px;
}

/* --- NEW BILLING CYCLE TOGGLE STYLES --- */
.billing-cycle-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 30px;
  font-weight: 600;
  color: var(--text-secondary);
}
.billing-cycle-toggle .monthly-label {
  color: var(--primary-color);
}
.billing-cycle-toggle .annual-label {
  color: var(--success-color);
}
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-switch .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--primary-color);
  transition: 0.4s;
  border-radius: 26px;
}
.toggle-switch .slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: var(--success-color);
}
input:checked + .slider:before {
  transform: translateX(22px);
}
.annual-discount-badge {
  background-color: var(--success-color);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.75em;
  font-weight: 600;
}

/* --- NEW UPGRADE BUTTON STYLES --- */
.upgrade-buttons-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.upgrade-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 15px 20px;
  border-radius: 12px;
  border: 1px solid transparent;
  width: 100%;
  cursor: pointer;
  transition: all 0.2s ease;
  background-color: #f9fafb;
  border-color: #e5e7eb;
}

.upgrade-button:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.upgrade-title {
  font-size: 1.3em;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 5px;
}

.upgrade-desc {
  font-size: 1em;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* --- NEW --- Styles for the primary upgrade button */
.upgrade-button.pro-upgrade {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.upgrade-button.pro-upgrade .upgrade-title,
.upgrade-button.pro-upgrade .upgrade-desc {
  color: white;
}

.upgrade-button.pro-upgrade:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
}

.add-seat-button {
  font-size: 1.1em;
  font-weight: 600;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-bottom: 15px;
}

#addOnButtons {
  display: flex;
  flex-direction: row;
  gap: 15px;
}

/* © 2026 HumanWidget. All Rights Reserved. */
