/* Legal Pages Styles - ResiApp */
/* Consistent with pricing.css design language */

:root {
  --primary: #3b82f6;
  --primary-dark: #3b82f6;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-gradient-start: #f0f4ff;
  --bg-gradient-end: #e0e7ff;
  --border-light: #e2e8f0;
  --success: #10b981;
  --warning: #f59e0b;
}

/* Scoped to #legal-page to avoid affecting other pages */
#legal-page {
  font-family: var(--font-heading);
  background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  min-height: 100vh;
  color: var(--text-primary);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

#legal-page *, #legal-page *::before, #legal-page *::after {
  box-sizing: border-box;
}

#legal-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.legal-header {
  background: var(--bg-primary);
  padding: 1rem 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.legal-header .logo {
  font-size: var(--fs-4xl);
  font-weight: var(--fw-bold);
  color: var(--primary);
  text-decoration: none;
}

.legal-header .header-nav {
  display: flex;
  gap: 1rem;
}

.legal-header .nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.legal-header .nav-link:hover {
  background: var(--bg-secondary);
  color: var(--primary);
}

/* Main Content */
.legal-content {
  flex: 1;
  padding: 3rem 1.5rem;
}

.legal-container {
  max-width: 900px;
  margin: 0 auto;
  background: var(--bg-primary);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 3rem 4rem;
}

@media (max-width: 768px) {
  .legal-container {
    padding: 2rem 1.5rem;
  }
}

.legal-title {
  font-size: var(--fs-7xl);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.legal-update {
  color: var(--text-muted);
  font-size: var(--fs-md);
  margin-bottom: 2rem;
}

/* LGPD Badge */
.lgpd-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 1px solid #a7f3d0;
  color: #065f46;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  font-weight: var(--fw-medium);
}

.lgpd-icon {
  font-size: var(--fs-4xl);
}

/* Sections */
.legal-section {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-light);
}

.legal-section:last-of-type {
  border-bottom: none;
}

.legal-section h2 {
  font-size: var(--fs-4xl);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.legal-section h3 {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  margin: 1.5rem 0 0.75rem;
}

.legal-section p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.legal-section ul {
  margin: 1rem 0 1rem 1.5rem;
  color: var(--text-secondary);
}

.legal-section ul li {
  margin-bottom: 0.5rem;
}

.legal-section ul li strong {
  color: var(--text-primary);
}

/* Data Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: var(--fs-md);
}

.data-table th,
.data-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.data-table th {
  background: var(--bg-secondary);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
}

.data-table td {
  color: var(--text-secondary);
}

.data-table td strong {
  color: var(--text-primary);
}

.data-table tr:hover {
  background: var(--bg-secondary);
}

/* Rights Grid */
.rights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.right-item {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--border-light);
}

.right-icon {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--fw-semibold);
  flex-shrink: 0;
}

.right-item strong {
  display: block;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.right-item p {
  margin: 0;
  font-size: var(--fs-md);
  color: var(--text-muted);
}

/* Highlight Box */
.highlight-box {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid #fbbf24;
  color: #92400e;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  margin: 1.5rem 0;
}

.highlight-box strong {
  color: #78350f;
}

/* Contact List */
#legal-page .contact-list {
  list-style: none;
  margin-left: 0;
  padding: 1rem 1.5rem;
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--border-light);
}

.contact-list li {
  margin-bottom: 0.5rem;
}

.contact-list li:last-child {
  margin-bottom: 0;
}

/* Footer Note */
.legal-footer-note {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border-light);
  text-align: center;
}

.legal-footer-note p {
  color: var(--text-muted);
  font-size: var(--fs-md);
}

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

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

/* Links in content */
.legal-section a {
  color: var(--primary);
  text-decoration: none;
}

.legal-section a:hover {
  text-decoration: underline;
}

/* Footer */
.legal-page-footer {
  background: var(--text-primary);
  color: white;
  padding: 3rem 2rem 1.5rem;
  margin-top: auto;
}

.legal-page-footer .footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.legal-page-footer .footer-logo {
  font-size: var(--fs-4xl);
  font-weight: var(--fw-bold);
}

.legal-page-footer .footer-tagline {
  color: var(--text-muted);
  font-size: var(--fs-md);
  margin-top: 0.25rem;
}

.legal-page-footer .footer-links {
  display: flex;
  gap: 2rem;
}

.legal-page-footer .footer-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.legal-page-footer .footer-link:hover,
.legal-page-footer .footer-link.active {
  color: white;
}

.legal-page-footer .footer-copyright {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

/* ========================================
   Cookie Consent Banner Styles
   ======================================== */

.cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-primary);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  padding: 1.5rem 2rem;
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

.cookie-consent-banner.visible {
  transform: translateY(0);
}

.cookie-consent-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.cookie-consent-text {
  flex: 1;
  min-width: 300px;
}

.cookie-consent-text h4 {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cookie-consent-text p {
  color: var(--text-secondary);
  font-size: var(--fs-md);
  margin: 0;
}

.cookie-consent-text a {
  color: var(--primary);
  text-decoration: none;
}

.cookie-consent-text a:hover {
  text-decoration: underline;
}

.cookie-consent-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.cookie-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: var(--fw-semibold);
  font-size: var(--fs-md);
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.cookie-btn-accept {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
}

.cookie-btn-accept:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.cookie-btn-customize {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

.cookie-btn-customize:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.cookie-btn-reject {
  background: transparent;
  color: var(--text-muted);
}

.cookie-btn-reject:hover {
  color: var(--text-primary);
}

/* Cookie Settings Modal */
.cookie-settings-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.cookie-settings-modal.visible {
  opacity: 1;
  visibility: visible;
}

.cookie-settings-content {
  background: var(--bg-primary);
  border-radius: 16px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 2rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.cookie-settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.cookie-settings-header h3 {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
}

.cookie-settings-close {
  background: none;
  border: none;
  font-size: var(--fs-4xl);
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  line-height: 1;
}

.cookie-settings-close:hover {
  color: var(--text-primary);
}

.cookie-category {
  padding: 1.25rem;
  background: var(--bg-secondary);
  border-radius: 12px;
  margin-bottom: 1rem;
}

.cookie-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.cookie-category-header h4 {
  font-size: var(--fs-xl);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
}

.cookie-category p {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  margin: 0;
}

/* Toggle Switch */
.cookie-toggle {
  position: relative;
  width: 48px;
  height: 26px;
}

.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--border-light);
  transition: 0.3s;
  border-radius: 26px;
}

.cookie-toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cookie-toggle input:checked + .cookie-toggle-slider {
  background: var(--primary);
}

.cookie-toggle input:checked + .cookie-toggle-slider:before {
  transform: translateX(22px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
  opacity: 0.6;
  cursor: not-allowed;
}

.cookie-settings-footer {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}

/* Responsive */
@media (max-width: 768px) {
  .legal-title {
    font-size: var(--fs-5xl);
  }
  
  .cookie-consent-content {
    flex-direction: column;
    text-align: center;
  }
  
  .cookie-consent-actions {
    width: 100%;
    justify-content: center;
  }
  
  .legal-page-footer .footer-content {
    flex-direction: column;
    text-align: center;
  }
  
  .legal-page-footer .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .rights-grid {
    grid-template-columns: 1fr;
  }
  
  .data-table {
    font-size: var(--fs-sm);
  }
  
  .data-table th,
  .data-table td {
    padding: 0.75rem 0.5rem;
  }
}
