/* Floating contact buttons */
.fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1030;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  font-family: 'Prompt', sans-serif;
}

.fab__actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fab__btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(27, 58, 42, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fab__btn svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fab__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(27, 58, 42, 0.3);
}

.fab__btn:focus-visible {
  outline: 3px solid #1b3a2a;
  outline-offset: 3px;
}

/* label shown to the left of each action on hover/focus */
.fab__actions .fab__btn::before {
  content: attr(data-label);
  position: absolute;
  right: calc(100% + 12px);
  padding: 6px 12px;
  border-radius: 8px;
  background: #1b3a2a;
  color: #fff;
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateX(6px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.fab__actions .fab__btn:hover::before,
.fab__actions .fab__btn:focus-visible::before {
  opacity: 1;
  transform: translateX(0);
}

.fab__btn--call {
  background: #1b3a2a;
  color: #fff;
}

.fab__btn--request {
  background: linear-gradient(135deg, #3d7a14 0%, #4a841d 100%);
  color: #fff;
}

.fab__btn--report {
  background: #eab308;
  color: #1b3a2a;
}

.fab__btn--toggle {
  background: linear-gradient(135deg, #d4ecc2 0%, #a8d68a 100%);
  color: #1b3a2a;
}

/* actions fan out above the toggle, one after another */
.fab__actions .fab__btn {
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.8);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
}

.fab--open .fab__actions .fab__btn {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}

.fab--open .fab__actions .fab__btn:nth-child(3) { transition-delay: 0s; }
.fab--open .fab__actions .fab__btn:nth-child(2) { transition-delay: 0.04s; }
.fab--open .fab__actions .fab__btn:nth-child(1) { transition-delay: 0.08s; }

.fab--open .fab__actions .fab__btn:hover {
  transform: translateY(-2px);
}

/* Service request popup */
.sr-dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  font-family: 'Prompt', sans-serif;
  color: #1a2d40;
}

.sr-dialog::backdrop {
  background: rgba(20, 35, 25, 0.55);
}

.sr-dialog[open] {
  animation: sr-pop 0.2s ease;
}

@keyframes sr-pop {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
}

.sr-form {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 32px);
  margin: 0;
}

.sr-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  background: #3d7a14;
  color: #fff;
}

.sr-header__icon {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
}

.sr-header svg,
.sr-submit svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sr-header__text {
  flex: 1;
  min-width: 0;
}

.sr-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}

.sr-header p {
  margin: 2px 0 0;
  font-size: 13px;
  opacity: 0.85;
}

.sr-close {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #2f6a10;
  color: #fff;
  cursor: pointer;
}

.sr-close:hover {
  background: #24520c;
}

.sr-body {
  padding: 24px;
  overflow-y: auto;
}

.sr-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
}

.sr-label {
  float: none;
  width: auto;
  margin: 0 0 8px;
  padding: 0;
  font-size: 14px;
  color: #1a2d40;
}

.sr-req {
  color: #e11d48;
}

.sr-radios {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.sr-radio {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #e3e8ee;
  border-radius: 10px;
  cursor: pointer;
  font-size: 15px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.sr-radio input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #5a9a2b;
}

.sr-radio:hover,
.sr-radio--checked {
  border-color: #7EC241;
  background: #f3faee;
}

.sr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 20px;
}

.sr-field--full {
  grid-column: 1 / -1;
}

.sr-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d6dde5;
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 15px;
  color: #1a2d40;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sr-input::placeholder {
  color: #6b7785;
}

.sr-input:focus {
  outline: none;
  border-color: #7EC241;
  box-shadow: 0 0 0 3px rgba(126, 194, 65, 0.25);
}

.sr-input[aria-invalid="true"] {
  border-color: #e11d48;
}

.sr-textarea {
  resize: vertical;
}

.sr-error {
  margin-top: 4px;
  font-size: 13px;
  color: #e11d48;
}

.sr-turnstile {
  margin-bottom: 16px;
}

.sr-status {
  margin: 0 0 16px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
}

.sr-status--success {
  background: #ecf7e4;
  color: #3d6e17;
}

.sr-status--error {
  background: #fdecef;
  color: #b4123a;
}

.sr-actions {
  display: flex;
  gap: 14px;
}

.sr-submit,
.sr-reset {
  padding: 12px 22px;
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-size: 16px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.sr-submit {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #3d7a14;
  color: #fff;
}

.sr-reset {
  background: #e5e7eb;
  color: #374151;
}

.sr-submit:hover,
.sr-reset:hover {
  opacity: 0.9;
}

.sr-submit:disabled,
.sr-reset:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Success popup shown after the request is sent */
.sr-success {
  width: min(400px, calc(100vw - 32px));
}

.sr-success__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 28px 28px;
  text-align: center;
}

.sr-success__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: #ecf7e4;
  color: #3d7a14;
}

.sr-success__icon svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sr-success h2 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 600;
  color: #1a2d40;
}

.sr-success p {
  margin: 0 0 24px;
  font-size: 15px;
  color: #4d6a87;
}

.sr-success .sr-submit {
  flex: none;
  width: 100%;
}

@media (max-width: 640px) {
  .fab {
    right: 16px;
    bottom: 16px;
  }

  .sr-radios,
  .sr-grid {
    grid-template-columns: 1fr;
  }

  .sr-header h2 {
    font-size: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fab__btn,
  .fab__actions .fab__btn,
  .fab__actions .fab__btn::before {
    transition: none;
  }

  .sr-dialog[open] {
    animation: none;
  }
}
