/* Copyright 2025 Renofy Ltd. All rights reserved. */
/* Action Footer Component - Provides quick access to key actions (fixed on mobile, card on desktop) */

/* Mobile-first base styles */
.action-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-index-sticky);
  background: var(--color-bg-surface);
  border-top: 0.5px solid var(--color-border);
  padding: 0.75rem;
}

/* PWA mode only - extra bottom padding for installed app */
@media (display-mode: standalone) {
  .action-footer {
    padding: 0.75rem 1rem 1.75rem 1rem;
  }
}

/* Content wrapper */
.action-footer__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
}

/* Text content (public users only) */
.action-footer__text {
  text-align: center;
}

.action-footer__title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: 0.25rem;
}

.action-footer__description {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  text-align: center;
}

/* Button container */
.action-footer__buttons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

/* Buttons size based on content but grow to fill space */
.action-footer__buttons .button {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: var(--font-weight-medium);
  padding: 0.75rem 1rem;
}

/* Forms inside button container */
.action-footer__buttons form {
  flex: 1 1 auto;
  min-width: 0;
}

.action-footer__buttons form .button {
  width: 100%;
}

/* Ensure page content doesn't get hidden under footer */
/* Automatically detects when .action-footer exists and adds padding */
body:has(.action-footer) {
  padding-bottom: var(--height-action-footer);
}

/* Desktop styles */
@media (min-width: 821px) {
  /* Hide action footer on desktop - replaced by action sidebar */
  #action-footer-container {
    display: none;
  }

  /* Remove body padding on desktop - no fixed footer */
  body:has(.action-footer) {
    padding-bottom: 0;
  }
}
