/**
 * Footer Styles
 * Apple-inspired footer with clean hierarchy and minimal design
 */

/* ========================================================================
   SITE FOOTER
   ======================================================================== */

.site-footer {
  flex-shrink: 0;
  width: 100%;
  margin-top: auto;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
  transition: all 0.3s ease;
  padding: 0;
  color: rgba(255, 255, 255, 0.92);
}

.footer-toggle {
  width: 100%;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.2s ease;
  z-index: 10;
}

.footer-toggle:hover {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.9);
}

.footer-copyright-minimized {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  font-weight: 400;
  flex: 1;
  text-align: left;
  transition: opacity 0.3s ease;
}

.footer-toggle-icon {
  font-size: 12px;
  transition: transform 0.3s ease;
  display: inline-block;
}

.site-footer.expanded .footer-toggle-icon {
  transform: rotate(180deg);
}

.site-footer.expanded .footer-copyright-minimized {
  opacity: 0;
  pointer-events: none;
}

.footer-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
  padding: 0 20px;
}

.site-footer.expanded .footer-content {
  max-height: 1000px;
  opacity: 1;
  padding: 24px 20px 16px;
}

.footer-content .section-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 16px;
}

.footer-column {
  display: flex;
  flex-direction: column;
}

.footer-column h4 {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.footer-column ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-column li {
  margin-bottom: 6px;
}

.footer-column a {
  display: inline-block;
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-column a:hover {
  color: rgba(255, 255, 255, 0.95);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-top: 16px;
  text-align: center;
}

.footer-copyright {
  margin: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.footer-legal {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.footer-legal a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-legal a:hover {
  color: rgba(255, 255, 255, 0.95);
}

.footer-legal a:not(:last-child)::after {
  content: '|';
  margin-left: 16px;
  color: rgba(255, 255, 255, 0.4);
  pointer-events: none;
}

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .site-footer.expanded .footer-content {
    padding: 20px 16px 16px;
  }
}

.app-shell:not(.app-shell-dark) .site-footer {
  background: var(--color-grey-100);
  border-top: 1px solid var(--color-grey-200);
  color: var(--color-grey-900);
}

.app-shell:not(.app-shell-dark) .footer-toggle {
  background: rgba(0, 0, 0, 0.03);
  border-top-color: rgba(0, 0, 0, 0.08);
  color: var(--color-grey-700);
}

.app-shell:not(.app-shell-dark) .footer-column h4,
.app-shell:not(.app-shell-dark) .footer-column a,
.app-shell:not(.app-shell-dark) .footer-legal a,
.app-shell:not(.app-shell-dark) .footer-copyright {
  color: var(--color-grey-800);
}

/* ========================================================================
   FOOTER BREADCRUMB (Optional)
   Minimal breadcrumb like Apple.com
   ======================================================================== */

.footer-breadcrumb {
  padding-bottom: var(--space-6);
  margin-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-grey-300);
}

.footer-breadcrumb ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-breadcrumb li {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--color-grey-600);
  font-size: var(--font-size-xs);
}

.footer-breadcrumb li:not(:last-child)::after {
  content: '›';
  margin-left: var(--space-1);
  color: var(--color-grey-500);
}

.footer-breadcrumb a {
  color: var(--color-grey-700);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-standard);
}

.footer-breadcrumb a:hover {
  color: var(--color-grey-900);
}

/* ========================================================================
   FOOTER LANGUAGE/REGION SELECTOR (Optional)
   Apple-style language selector
   ======================================================================== */

.footer-locale {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) 0;
  margin-top: var(--space-6);
  border-top: 1px solid var(--color-grey-300);
}

.footer-locale-button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: transparent;
  border: 1px solid var(--color-grey-300);
  border-radius: var(--radius-md);
  color: var(--color-grey-700);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-standard);
}

.footer-locale-button:hover {
  border-color: var(--color-grey-400);
  background: var(--color-grey-50);
}

.footer-locale-button svg {
  width: 14px;
  height: 14px;
}

/* ========================================================================
   FOOTER SOCIAL LINKS (Optional)
   Clean social icon links
   ======================================================================== */

.footer-social {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-6) 0;
}

.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--color-grey-600);
  transition: color var(--duration-fast) var(--ease-standard);
}

.footer-social-link:hover {
  color: var(--color-grey-900);
}

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

/* ========================================================================
   FINE PRINT
   Very small disclaimer text like Apple uses
   ======================================================================== */

.footer-fine-print {
  padding-top: var(--space-6);
  margin-top: var(--space-6);
  border-top: 1px solid var(--color-grey-300);
  color: var(--color-grey-600);
  font-size: 10px;
  line-height: 1.6;
}

.footer-fine-print p {
  margin-bottom: var(--space-3);
}

.footer-fine-print p:last-child {
  margin-bottom: 0;
}

/* ========================================================================
   NEWSLETTER SIGNUP (Optional)
   Minimal email signup like Apple
   ======================================================================== */

.footer-newsletter {
  padding: var(--space-8) 0;
  border-bottom: 1px solid var(--color-grey-300);
  margin-bottom: var(--space-8);
}

.footer-newsletter h4 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-grey-900);
  margin-bottom: var(--space-3);
}

.footer-newsletter p {
  color: var(--color-grey-700);
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-4);
  max-width: 600px;
}

.footer-newsletter-form {
  display: flex;
  gap: var(--space-3);
  max-width: 600px;
}

.footer-newsletter-input {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-grey-300);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-base);
  background: var(--color-white);
  transition: border-color var(--duration-fast) var(--ease-standard);
}

.footer-newsletter-input:focus {
  outline: none;
  border-color: var(--color-primary-500);
}

.footer-newsletter-button {
  padding: var(--space-3) var(--space-6);
  background: var(--color-grey-900);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius-lg);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-standard);
  white-space: nowrap;
}

.footer-newsletter-button:hover {
  background: var(--color-grey-800);
}

@media (max-width: 640px) {
  .footer-newsletter-form {
    flex-direction: column;
  }

  .footer-newsletter-button {
    width: 100%;
  }
}

/* ========================================================================
   ACCESSIBILITY
   ======================================================================== */

/* High contrast mode support */
@media (prefers-contrast: high) {
  .footer-column a,
  .footer-legal a {
    text-decoration: underline;
  }
}

/* Print styles */
@media print {
  .site-footer {
    display: none;
  }
}
