/* ============================================
   BUGGY FOOTER - Consistent Mobile Styling
   ============================================

   This CSS ensures footer consistency across all pages
   on mobile devices (iPhone SE 375px, iPhone 14 Pro Max 430px).

   Classes:
   - .buggy-footer-social: Wrapper for social icons (prevents wrapping)
   - .buggy-footer-submit: Newsletter submit button (always teal)
   - .buggy-footer-newsletter: Newsletter section wrapper
   ============================================ */

/* Footer Top Padding - Breathing room for icons */
/* Note: main.css removed margin-top:50px, so we add internal padding here */
#main-footer {
  padding-top: 32px;
}

/* Social Icons Container - Prevent Wrapping */
.buggy-footer-social {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

/* Social Icon Button - Consistent Size */
.buggy-footer-social .btn-floating {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  min-width: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Newsletter Submit Button - Always Teal */
.buggy-footer-submit {
  background-color: #289a96 !important;
  border-color: #289a96 !important;
  color: white !important;
  padding: 0.5rem 1rem !important;
  height: auto !important;
  min-height: 38px !important;
  white-space: nowrap;
  overflow: visible !important;
  text-overflow: initial !important;
}

.buggy-footer-submit:hover {
  background-color: #1e7471 !important;
  border-color: #1e7471 !important;
  color: white !important;
}

.buggy-footer-submit:focus {
  background-color: #1e7471 !important;
  border-color: #1e7471 !important;
  box-shadow: 0 0 0 0.2rem rgba(40, 154, 150, 0.5) !important;
}

/* Floating label row (input + button) */
.buggy-footer-floating-row {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.buggy-footer-floating-field {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.buggy-footer-input {
  width: 100%;
  background: transparent !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  border-right: 0 !important;
  border-radius: 0.375rem 0 0 0.375rem !important;
  padding: 1rem 0.9rem 0.5rem 0.9rem !important;
  height: calc(3.5rem + 2px);
  box-shadow: none !important;
  line-height: 1.25;
}

.buggy-footer-input:focus {
  border-color: #289a96 !important;
}

.buggy-footer-input::placeholder {
  color: transparent !important;
  opacity: 0 !important;
}

.buggy-footer-label {
  position: absolute;
  top: 1rem;
  left: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  pointer-events: none;
  transition: all 0.2s ease;
  font-size: 1rem;
}

.buggy-footer-input:focus ~ .buggy-footer-label,
.buggy-footer-floating-field.has-value .buggy-footer-label,
.buggy-footer-input:not(:placeholder-shown) ~ .buggy-footer-label {
  top: 0.25rem;
  font-size: 0.8rem;
  color: #ffffff;
}

/* Submit button */
.buggy-footer-floating-row > .buggy-footer-submit {
  border-radius: 0 0.375rem 0.375rem 0 !important;
  margin-left: 0;
  height: calc(3.5rem + 2px);
  display: inline-flex;
  align-items: center;
}

/* Mobile Adjustments - iPhone 14 Pro Max and smaller */
@media (max-width: 430px) {
  .buggy-footer-social {
    gap: 0.25rem;
  }

  .buggy-footer-social .btn-floating {
    width: 2.25rem;
    height: 2.25rem;
    min-width: 2.25rem;
    margin: 0.25rem !important;
  }

  .buggy-footer-social .btn-floating img {
    height: 1em !important;
  }
}

/* Mobile Adjustments - iPhone SE */
@media (max-width: 375px) {
  .buggy-footer-social .btn-floating {
    width: 2rem;
    height: 2rem;
    min-width: 2rem;
    margin: 0.125rem !important;
  }

  .buggy-footer-social .btn-floating img {
    height: 0.9em !important;
  }

  /* Ensure newsletter stays on one row on smallest screens */
  .buggy-footer-newsletter .input-group {
    flex-wrap: nowrap !important;
  }

  .buggy-footer-newsletter .form-control {
    font-size: 14px;
  }

  .buggy-footer-submit {
    font-size: 14px !important;
    padding: 0.375rem 0.5rem !important;
  }

  .buggy-footer-label {
    font-size: 0.9rem;
  }
}

/* iPad and Desktop - Larger Newsletter Input */
@media (min-width: 768px) {
  .buggy-footer-newsletter .col-md-6.offset-md-3 {
    width: 80% !important;
    max-width: 600px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    flex: none !important;
  }
}
