/**
 * FSL Servizi — stili widget CTA + popup modal + sticky mobile.
 * Brand Fusilli: red #c30f0f · navy #272c49 · cream #f4f1ea
 */

.fsl-service {
  --fsl-svc-accent: #c30f0f;
  color: #1a1a1a;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.fsl-service * { box-sizing: border-box; }

/* ===== BUTTONS ===== */
.fsl-btn-svc {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  padding: 14px 30px;
  border-radius: 4px;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.3px;
  font-family: inherit;
  line-height: 1.4;
}
.fsl-btn-svc:hover { transform: translateY(-1px); }
.fsl-btn-svc--primary {
  background: var(--fsl-svc-accent);
  color: #fff !important;
  border-color: var(--fsl-svc-accent);
}
.fsl-btn-svc--primary:hover { background: #a00d0d; border-color: #a00d0d; color: #fff !important; }
.fsl-btn-svc--white {
  background: #fff;
  color: var(--fsl-svc-accent) !important;
  border-color: #fff;
}
.fsl-btn-svc--white:hover { background: #f4f1ea; color: var(--fsl-svc-accent) !important; }
.fsl-btn-svc--outline {
  background: transparent;
  color: var(--fsl-svc-accent) !important;
  border-color: var(--fsl-svc-accent);
}
.fsl-btn-svc--outline:hover { background: var(--fsl-svc-accent); color: #fff !important; }
.fsl-btn-svc--dark {
  background: #272c49;
  color: #fff !important;
  border-color: #272c49;
}
.fsl-btn-svc--dark:hover { background: #1a1d33; border-color: #1a1d33; color: #fff !important; }
.fsl-btn-svc--wa {
  background: #25D366;
  color: #fff !important;
  border-color: #25D366;
}
.fsl-btn-svc--wa:hover { background: #1eb858; color: #fff !important; }

/* ===== CTA BLOCK ===== */
.fsl-svc-cta-block {
  background: #272c49;
  color: #fff;
  padding: 40px 28px;
  border-radius: 8px;
  text-align: center;
  margin: 0;
}
@media (min-width: 768px) { .fsl-svc-cta-block { padding: 56px 36px; } }
.fsl-svc-cta-block__title {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 14px;
  line-height: 1.25;
}
@media (min-width: 768px) { .fsl-svc-cta-block__title { font-size: 30px; } }
@media (min-width: 1200px) { .fsl-svc-cta-block__title { font-size: 34px; } }
.fsl-svc-cta-block__desc {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 28px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
.fsl-svc-cta-block__buttons {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 8px;
}
.fsl-svc-cta-block__phone {
  margin: 18px 0 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}
.fsl-svc-cta-block__phone a {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

.fsl-svc-cta-bare { padding: 20px 0; }

/* ===== MODAL POPUP ===== */
.fsl-svc-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fslSvcFadeIn 0.25s ease;
}
.fsl-svc-modal[hidden] { display: none; }
@keyframes fslSvcFadeIn { from { opacity: 0; } to { opacity: 1; } }
.fsl-svc-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 29, 51, 0.7);
  backdrop-filter: blur(2px);
}
.fsl-svc-modal__card {
  position: relative;
  background: #fff;
  border-radius: 10px;
  padding: 32px 36px;
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  animation: fslSvcSlideUp 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes fslSvcSlideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.fsl-svc-modal__close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: transparent;
  border: 0;
  font-size: 28px;
  color: #6c6f7d;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease;
  line-height: 1;
}
.fsl-svc-modal__close:hover { background: #f0ece4; color: #272c49; }
.fsl-svc-modal__title {
  font-size: 22px;
  font-weight: 700;
  color: #272c49;
  margin: 0 0 8px;
}
.fsl-svc-modal__subtitle {
  font-size: 14px;
  color: #6c6f7d;
  margin: 0 0 22px;
  line-height: 1.5;
}

/* ===== FORM ===== */
.fsl-svc-form p { margin: 0 0 14px; }
.fsl-svc-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #272c49;
  margin-bottom: 6px;
}
.fsl-svc-form input[type="text"],
.fsl-svc-form input[type="email"],
.fsl-svc-form input[type="tel"],
.fsl-svc-form input[type="number"],
.fsl-svc-form textarea,
.fsl-svc-form select {
  width: 100%;
  padding: 10px 14px;
  font-size: 15px;
  border: 1px solid #c3c4c7;
  border-radius: 4px;
  font-family: inherit;
  background: #fff;
  color: #1a1a1a;
  transition: border-color 0.2s ease;
}
.fsl-svc-form input:focus,
.fsl-svc-form textarea:focus,
.fsl-svc-form select:focus {
  outline: 0;
  border-color: var(--fsl-svc-accent);
  box-shadow: 0 0 0 3px rgba(195, 15, 15, 0.12);
}
.fsl-svc-form textarea { resize: vertical; min-height: 70px; }
.fsl-svc-form__privacy {
  font-size: 13px;
  font-weight: 400;
  color: #4a5070;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 0;
}
.fsl-svc-form__privacy input { width: auto !important; margin-top: 2px; }
.fsl-svc-form__submit-row { margin-top: 18px; margin-bottom: 0; }
.fsl-svc-form__submit-row .fsl-btn-svc { width: 100%; justify-content: center; }
.fsl-svc-form__feedback {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 14px;
}
.fsl-svc-form__feedback.is-success {
  background: #e8f5e9;
  border: 1px solid #4caf50;
  color: #1b5e20;
}
.fsl-svc-form__feedback.is-error {
  background: #fff0f0;
  border: 1px solid #d33;
  color: #a00;
}

/* ===== STICKY MOBILE ===== */
.fsl-svc-sticky-mobile {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9998;
  background: #fff;
  border-top: 1px solid #e5e3dd;
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.08);
  padding: 12px 16px;
  display: flex;
  gap: 10px;
  align-items: center;
}
@media (min-width: 768px) {
  .fsl-svc-sticky-mobile { display: none !important; }
}
.fsl-svc-sticky-mobile__btn {
  flex: 1;
  background: var(--fsl-svc-accent);
  color: #fff;
  border: 0;
  padding: 12px 18px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  font-family: inherit;
}
.fsl-svc-sticky-mobile__btn:hover { background: #a00d0d; color: #fff; }
.fsl-svc-sticky-mobile__wa {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.fsl-svc-sticky-mobile__wa:hover { background: #1eb858; }

@media (max-width: 767px) {
  body.fsl-svc-has-sticky { padding-bottom: 80px; }
}
