/* Legal content styles for privacy policy and limited use pages */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

.legal-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 2rem;
}

.legal-content h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #374151;
  margin: 2rem 0 1rem;
}

.legal-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #374151;
  margin: 1.5rem 0 1rem;
}

.legal-content p {
  color: #4B5563;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.legal-content ul {
  margin: 1rem 0 2rem;
  padding-left: 1.5rem;
}

.legal-content li {
  color: #4B5563;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.legal-content a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

.legal-content a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* Table of Contents */
.table-of-contents {
  background: #f9fafb;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.table-of-contents h2 {
  margin-top: 0 !important;
  font-size: 1.25rem !important;
}

.table-of-contents ul {
  margin: 1rem 0 0 !important;
  padding-left: 1.25rem !important;
}

.table-of-contents li {
  margin-bottom: 0.5rem !important;
}

/* Sections */
.legal-content section {
  margin: 3rem 0;
}

.legal-content section:first-of-type {
  margin-top: 2rem;
}

.legal-content .effective-date {
  color: #6B7280;
  font-size: 0.875rem;
}

/* Contact page styles */
.contact-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

.contact-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 1.5rem;
  text-align: center;
}

.contact-content p {
  color: #4B5563;
  line-height: 1.6;
  margin-bottom: 2rem;
  text-align: center;
}

.contact-content a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

.contact-content a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin: 2rem 0;
}

.contact-method {
  background: #f9fafb;
  border-radius: 8px;
  padding: 2rem;
}

.contact-method h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 1rem;
  text-align: center;
}

.google-form {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 1rem 0;
}

.google-form iframe {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* User Files page styles */
.user-files-content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 0;
}

.user-files-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 1.5rem;
}

.credit-info {
  background: #f9fafb;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.credit-info h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 1rem;
}

.credit-info .unlimited {
  color: #059669;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.credit-info .unlimited::before {
  content: '✓';
  font-size: 1.25rem;
}

.credit-progress {
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.credit-progress .progress-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.credit-progress .progress-bar.high {
  background: #059669;
}

.credit-progress .progress-bar.medium {
  background: #fbbf24;
}

.credit-progress .progress-bar.low {
  background: #ef4444;
}

.credit-text {
  display: flex;
  justify-content: space-between;
  color: #6b7280;
  font-size: 0.875rem;
}

.feedback-banner {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.feedback-banner a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.feedback-banner a:hover {
  text-decoration: underline;
}

.charts-table {
  background: white;
  border: 1px solid var(--border-gray);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.charts-table table {
  width: 100%;
  border-collapse: collapse;
}

.charts-table caption {
  background: #f9fafb;
  padding: 1rem;
  border-bottom: 1px solid var(--border-gray);
}

.charts-table caption h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.charts-table th {
  background: #f9fafb;
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  color: #374151;
  border-bottom: 1px solid var(--border-gray);
}

.charts-table td {
  padding: 1rem;
  color: #4b5563;
  border-bottom: 1px solid var(--border-gray);
}

.charts-table tr:last-child td {
  border-bottom: none;
}

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

.charts-table a:hover {
  text-decoration: underline;
}

/* Table layout improvements */
.charts-table {
  table-layout: fixed;
  width: 100%;
}

.charts-table td {
  padding: 12px;
  vertical-align: middle;
}

/* Column widths */
.charts-table th:nth-child(1),
.charts-table td:nth-child(1) {
  width: 50%;
}

.charts-table th:nth-child(2),
.charts-table td:nth-child(2),
.charts-table th:nth-child(3),
.charts-table td:nth-child(3) {
  width: 60px;
  text-align: center;
  padding: 6px;
}

.charts-table th:nth-child(4),
.charts-table td:nth-child(4) {
  width: calc(50% - 120px);
}

/* Icon links */
.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
}

.icon-link:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.icon-link svg {
  width: 20px;
  height: 20px;
}

/* Download link with filename */

.filename-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sheets link centered */
.sheets-link {
  display: flex;
  justify-content: center;
}

/* Filename truncation */
.download-link {
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.download-link:hover {
  text-decoration: underline;
}

/* User greeting */
.user-greeting {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.user-greeting h1 {
  font-size: 1.75rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.user-greeting p {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* Best value tag */
.best-value {
  font-size: 0.8rem;
  background: #22c55e;
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: 1rem;
  margin-left: 0.5rem;
  vertical-align: middle;
}

/* Loading Overlay */
.form-container {
    position: relative;
}

.loading-overlay {
    margin-top: 2rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.loading-content {
    text-align: center;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.loading-text h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.progress-text {
    color: #666;
    font-size: 0.9rem;
}

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

/* Final Result Page Styles */
.success-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.success-icon {
    font-size: 2rem;
}

.success-message h3 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
}

/* Primary Action - Editor Button */
.primary-action {
    text-align: center;
    margin-bottom: 3rem;
}

.button-primary-cta {
    display: inline-block;
    background: linear-gradient(135deg, #7C3AED 0%, #6366F1 100%);
    color: white;
    text-decoration: none;
    border-radius: 1rem;
    padding: 1.25rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(124, 58, 237, 0.3);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.button-primary-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(124, 58, 237, 0.4);
    background: linear-gradient(135deg, #6D28D9 0%, #5B21B6 100%);
}

.button-primary-cta:active {
    transform: translateY(0);
}

.button-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    position: relative;
}

.button-text {
    font-size: 1.125rem;
}

.beta-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    letter-spacing: 0.05em;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.primary-action-description {
    margin-top: 0.75rem;
    color: #6B7280;
    font-size: 1rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Secondary Actions */
.secondary-actions {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #E5E7EB;
}

.secondary-actions h4 {
    font-size: 1rem;
    color: #6B7280;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.action-links-secondary {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.action-links-secondary .button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.action-links-secondary .button svg {
    width: 16px;
    height: 16px;
}

/* Responsive Design */
@media (max-width: 640px) {
    .success-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .button-primary-cta {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    .button-content {
        gap: 0.5rem;
    }
    
    .button-text {
        font-size: 1rem;
    }
    
    .action-links-secondary {
        flex-direction: column;
        align-items: center;
    }
    
    .action-links-secondary .button {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}
