/* ================================
   LinkedIn Profile to CRM Export
   Billing Page Styles
   ================================ */

/* CSS Variables */
:root {
  /* Primary Colors - Deep Blue Theme */
  --primary-color: #1e40af;
  --primary-dark: #1e3a8a;
  --primary-light: #3b82f6;
  
  /* Background Colors */
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --section-bg: #f1f5f9;
  
  /* Text Colors */
  --text-color: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  /* Accent Colors */
  --success-color: #059669;
  --success-bg: #d1fae5;
  --warning-color: #d97706;
  --warning-bg: #fef3c7;
  --error-color: #dc2626;
  
  /* Border & Shadow */
  --border-color: #e2e8f0;
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --border-radius-lg: 16px;
  --box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --box-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  
  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-color);
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  line-height: 1.5;
}

/* ================================
   Header
   ================================ */
header {
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
}

.header-content {
  max-width: 56rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.brand-icon {
  width: 2rem;
  height: 2rem;
  background-color: #1e3a5f;
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: white;
}

.brand-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-color);
}

.header-link {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.375rem;
  text-decoration: none;
  transition: color 0.2s;
}

.header-link:hover {
  color: var(--primary-color);
}

.header-link-cta {
  color: var(--primary-color);
  font-weight: 500;
}

/* ================================
   Main Content
   ================================ */
main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
}

.container {
  width: 100%;
  max-width: 32rem;
}

/* ================================
   Card Component
   ================================ */
.card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--box-shadow);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

/* Card Header */
.card-header {
  padding: 2rem 2rem 1.5rem;
  text-align: center;
  border-bottom: 1px solid #f1f5f9;
}

.early-access-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--warning-bg);
  color: var(--warning-color);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  margin-bottom: 1rem;
}

.card-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-color);
  margin: 0 0 0.5rem;
}

.card-header .subtitle {
  color: var(--text-muted);
  margin: 0;
  font-size: 1rem;
}

/* ================================
   Value Props Section
   ================================ */
.value-props {
  padding: 1.25rem 2rem;
  background-color: var(--section-bg);
  border-bottom: 1px solid #f1f5f9;
}

.value-props-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.value-prop {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #475569;
}

.value-prop svg {
  width: 1rem;
  height: 1rem;
  color: var(--success-color);
  flex-shrink: 0;
}

/* ================================
   Pricing Section
   ================================ */
.pricing-section {
  padding: 1.5rem 2rem;
}

.pricing-selector {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.plan-option {
  flex: 1;
  position: relative;
  padding: 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  background: var(--card-bg);
}

.plan-option:hover {
  border-color: #cbd5e1;
}

.plan-option.selected {
  border-color: var(--primary-color);
  background-color: #eff6ff;
}

.plan-badge {
  position: absolute;
  top: -0.625rem;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--success-color);
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  white-space: nowrap;
  text-transform: uppercase;
}

.plan-content {
  text-align: center;
  padding-top: 0.25rem;
}

.plan-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.plan-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-color);
}

.plan-price-period {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-muted);
}

.plan-detail {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.plan-savings {
  font-size: 0.75rem;
  color: var(--success-color);
  font-weight: 600;
  margin-top: 0.25rem;
}

/* ================================
   Payment Form
   ================================ */
#payment-form {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  margin-bottom: 0.375rem;
}

#payment-element {
  margin-bottom: 1.5rem;
}

/* Skeleton Loader */
.skeleton-container {
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  margin-bottom: 1.5rem;
}

.skeleton-line {
  height: 40px;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 4px;
  margin-bottom: 12px;
}

.skeleton-line:last-child {
  margin-bottom: 0;
}

.skeleton-short {
  width: 40%;
  height: 20px;
}

.skeleton-half {
  width: 48%;
}

.skeleton-row {
  display: flex;
  justify-content: space-between;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-container.hidden {
  display: none;
}

/* Submit Button */
#submit {
  width: 100%;
  background-color: #1e3a8a;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.875rem 1rem;
  border: none;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

#submit:hover {
  background-color: #172554;
}

#submit:disabled {
  background-color: #93c5fd;
  cursor: not-allowed;
}

#submit svg {
  width: 1rem;
  height: 1rem;
}

/* Spinner */
.spinner {
  display: none;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

#submit.loading .spinner {
  display: block;
}

#submit.loading #button-text {
  display: none;
}

/* Error Message */
#error-message {
  color: var(--error-color);
  font-size: 0.875rem;
  text-align: center;
  margin-top: 1rem;
}

/* Trust Signal */
.trust-signal {
  text-align: center;
  margin-top: 1rem;
}

.trust-signal p {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  margin: 0;
}

.trust-signal svg {
  width: 0.875rem;
  height: 0.875rem;
}

/* ================================
   Guarantees Section
   ================================ */
.guarantees {
  padding: 1rem 2rem;
  background-color: var(--section-bg);
  border-top: 1px solid #f1f5f9;
}

.guarantees-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.guarantee-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

/* ================================
   Security Badges
   ================================ */
.security-section {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.security-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.security-badge {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  font-size: 0.75rem;
  color: var(--text-light);
}

.security-badge svg {
  width: 1rem;
  height: 1rem;
}

.security-note {
  font-size: 0.75rem;
  color: var(--text-light);
  text-align: center;
  max-width: 28rem;
  margin: 0;
}

/* ================================
   Footer
   ================================ */
footer {
  background-color: var(--card-bg);
  border-top: 1px solid var(--border-color);
  padding: 1.5rem 1rem;
}

.footer-content {
  max-width: 56rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-brand {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

.footer-brand a {
  color: var(--primary-color);
  font-weight: 500;
  text-decoration: none;
}

.footer-brand a:hover {
  text-decoration: underline;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.875rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--primary-color);
}

/* ================================
   Success Page Styles
   ================================ */
.success-container {
  text-align: center;
  padding: 2rem;
}

.success-icon {
  width: 5rem;
  height: 5rem;
  background-color: var(--success-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.success-icon svg {
  width: 2.5rem;
  height: 2.5rem;
  color: var(--success-color);
}

.success-container h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-color);
  margin: 0 0 0.5rem;
}

.success-container .subtitle {
  color: var(--text-muted);
  margin: 0;
}

.license-box {
  background: var(--section-bg);
  border: 2px dashed var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  text-align: center;
}

.license-box.ready {
  background: #f0fdf4;
  border: 2px solid var(--success-color);
}

.license-box.error {
  background: #fef2f2;
  border: 2px solid var(--error-color);
}

.license-key {
  font-family: 'Courier New', monospace;
  font-size: 1.1rem;
  font-weight: bold;
  color: #166534;
  word-break: break-all;
  user-select: all;
}

.copy-btn {
  margin-top: 0.75rem;
  padding: 0.5rem 1rem;
  background: var(--primary-dark);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.2s;
}

.copy-btn:hover {
  background: #172554;
}

.copy-btn.copied {
  background: var(--success-color);
}

.spinner-inline {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 3px solid var(--border-color);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

.instructions {
  background: var(--warning-bg);
  border: 1px solid #fbbf24;
  border-radius: var(--border-radius-sm);
  padding: 1.25rem;
  margin-top: 1.5rem;
  text-align: left;
}

.instructions h3 {
  margin: 0 0 0.75rem;
  color: #92400e;
  font-size: 1rem;
}

.instructions ol {
  margin: 0;
  padding-left: 1.5rem;
  color: #78350f;
}

.instructions li {
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.manage-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.manage-section h3 {
  color: var(--text-color);
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.manage-section p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin: 0 0 1rem;
}

.manage-btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: #64748b;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s;
}

.manage-btn:hover {
  background: #475569;
}

.manage-btn:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

.action-links {
  margin-top: 1.5rem;
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.action-links a {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
}

.action-links a:hover {
  text-decoration: underline;
}

.support-note {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  color: var(--text-light);
}

.support-note a {
  color: var(--primary-color);
  text-decoration: none;
}

.support-note a:hover {
  text-decoration: underline;
}

/* ================================
   Responsive Design
   ================================ */
@media (max-width: 640px) {
  .header-content {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .header-link {
    font-size: 0.8125rem;
  }
  
  .value-props-grid {
    grid-template-columns: 1fr;
  }
  
  .pricing-selector {
    flex-direction: column;
  }
  
  .guarantees-list {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .security-badges {
    flex-direction: column;
  }
  
  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
}
