.glf-wrapper {
  --glf-blue: #3f73de;
  --glf-green: #2d775c;
  --glf-text: #232a35;
  --glf-muted: #6f7b8b;
  --glf-border: #d7dbe4;
  --glf-bg: #e9ebef;

  font-family: "Avenir Next", "Segoe UI", sans-serif;
  background: var(--glf-bg);
  display: flex;
  justify-content: center;
  padding: 8px;
}

html.glf-app,
body.glf-app {
  height: 100%;
  overflow: hidden;
}

body.glf-app .wp-site-blocks,
body.glf-app #page,
body.glf-app .site {
  display: none !important;
}

body.glf-app .glf-wrapper {
  position: fixed;
  top: var(--glf-top-offset, 0px);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99990;
  margin: 0;
  padding: 0;
  width: 100vw;
  max-width: none;
}

body.glf-app .glf-shell {
  width: 100%;
  max-width: none;
  min-height: 0;
  height: 100%;
  border-radius: 0;
  border: none;
  overflow: hidden;
}

.glf-shell {
  width: 100%;
  max-width: 410px;
  min-height: 760px;
  background: #eef0f4;
  border: 1px solid #d4d8e1;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  display: grid;
  grid-template-rows: 260px minmax(0, 1fr) auto;
}

.glf-hero {
  height: 260px;
  position: relative;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(40, 63, 96, 0.15), rgba(40, 63, 96, 0.05)),
    var(--glf-cover-image, linear-gradient(180deg, #7ba5d4 0%, #6ea0d0 35%, #537f38 36%, #6b8e42 49%, #8a6c4c 50%, #7b5f43 100%));
  background-position: center;
  background-size: cover;
}

.glf-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 84px;
  background: linear-gradient(180deg, rgba(18, 27, 39, 0) 0%, rgba(18, 27, 39, 0.34) 100%);
  pointer-events: none;
}

.glf-icon-btn {
  position: absolute;
  top: 14px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #1f2a3d;
  font-size: 22px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
}

.glf-back {
  left: 12px;
}

.glf-close {
  right: 12px;
}

.glf-card-wrap {
  position: relative;
  margin-top: -48px;
  padding: 0 12px 12px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 3;
}

.glf-step {
  display: none;
  animation: glfSlide 0.24s ease;
}

.glf-step.is-active {
  display: block;
}

.glf-card {
  background: #fff;
  border: 1px solid var(--glf-border);
  border-radius: 12px;
  min-width: 0;
  padding: 22px 18px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 12px 32px rgba(20, 33, 48, 0.1);
  position: relative;
  z-index: 2;
}

.glf-card h2,
.glf-card h3 {
  margin: 0 0 12px;
  color: var(--glf-text);
  line-height: 1.25;
}

.glf-card h2 {
  font-size: 2.05rem;
  letter-spacing: -0.02em;
}

.glf-card h3 {
  font-size: 1.12rem;
}

.glf-card p {
  margin: 0 0 12px;
  color: var(--glf-muted);
  line-height: 1.35;
  font-size: 1.02rem;
}

.glf-success-list {
  margin: -2px 0 14px;
  padding: 0;
  list-style: none;
}

.glf-success-list li {
  position: relative;
  margin: 0 0 7px;
  padding-left: 18px;
  color: var(--glf-muted);
  line-height: 1.35;
  font-size: 1.02rem;
  text-align: left;
}

.glf-success-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.52em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7eb399;
}

.glf-card a {
  color: var(--glf-blue);
  font-weight: 700;
  text-decoration: none;
}

.glf-card-intro,
.glf-card-success {
  padding-top: 38px;
  text-align: center;
}

.glf-logo-badge {
  position: absolute;
  left: 50%;
  top: -30px;
  transform: translateX(-50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid #86bd9f;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 16px rgba(16, 31, 25, 0.14);
  z-index: 5;
}

.glf-logo-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.glf-brand {
  color: #7b8492;
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.glf-label {
  display: block;
  margin: 12px 0 4px;
  color: #778191;
  font-size: 0.98rem;
  font-weight: 700;
}

.glf-subnote {
  margin-top: -4px;
  font-size: 0.95rem;
}

.glf-hint {
  margin: 2px 0 8px;
  color: #778191;
  font-size: 0.92rem;
}

.glf-dependent-field {
  margin-top: 14px;
}

.glf-step input,
.glf-step select,
.glf-step textarea {
  width: 100%;
  box-sizing: border-box;
  border: none;
  border-bottom: 2px solid #d7dde8;
  background: transparent;
  padding: 9px 2px 8px;
  font-size: 1.9rem;
  line-height: 1.2;
  color: #7c8695;
  border-radius: 0;
}

#glf-comune,
#glf-email,
#glf-nome,
#glf-provincia,
#glf-telefono,
#glf-superficie {
  font-size: 1.08rem;
  padding: 9px 0;
}

.glf-step input:focus,
.glf-step select:focus,
.glf-step textarea:focus {
  outline: none;
  border-bottom-color: var(--glf-blue);
  color: #1b2536;
}

.glf-choice-group {
  display: grid;
  gap: 10px;
  margin-top: 8px;
  min-width: 0;
}

.glf-choice {
  width: 100% !important;
  max-width: 100%;
  border: 1px solid #cfd6e2;
  background: #fff;
  border-radius: 9px;
  box-sizing: border-box;
  display: block;
  min-width: 0;
  min-height: 56px;
  padding: 10px 14px;
  font-size: 1.06rem;
  font-weight: 700;
  color: #2a3443;
  line-height: 1.25;
  text-align: left;
  white-space: normal !important;
  word-break: break-word;
  overflow-wrap: anywhere;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.glf-choice.is-selected {
  border-color: var(--glf-green);
  color: var(--glf-green);
  background: #eef9f3;
  box-shadow: 0 0 0 2px rgba(45, 119, 92, 0.2);
}

.glf-error {
  min-height: 18px;
  margin: 3px 0 0;
  color: #bc1d1d;
  font-size: 12px;
}

.glf-footer {
  position: relative;
  background: #f2f4f8;
  border-top: 1px solid #d9deea;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  z-index: 8;
}

.glf-progress-blocks {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}

.glf-progress-block {
  height: 7px;
  border-radius: 999px;
  background: #d3dae6;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.glf-progress-block.is-complete {
  background: linear-gradient(90deg, #2d775c, #3f8c70);
  transform: translateY(-1px);
}

.glf-btn {
  width: 100%;
  max-width: 100%;
  min-height: 54px;
  border: none;
  border-radius: 8px;
  box-sizing: border-box;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  white-space: normal !important;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.glf-step[data-step="7"] .glf-card-success {
  padding-top: 22px;
}

.glf-step[data-step="7"] .glf-logo-badge {
  left: auto;
  position: relative;
  top: 0;
  transform: none;
  margin: 0 auto 12px;
}

.glf-step[data-step="1"] .glf-card-intro {
  padding-top: 22px;
}

.glf-step[data-step="1"] .glf-logo-badge {
  left: auto;
  position: relative;
  top: 0;
  transform: none;
  margin: 0 auto 12px;
}

.glf-btn-primary {
  background: var(--glf-green);
  color: #fff;
}

.glf-card a.glf-btn,
.glf-card a.glf-btn:visited,
.glf-card a.glf-btn:hover,
.glf-card a.glf-btn:focus {
  color: #fff !important;
  text-decoration: none;
}

.glf-btn.is-loading {
  opacity: 0.75;
}

@keyframes glfSlide {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 380px) {
  .glf-card h2 {
    font-size: 1.8rem;
  }

  .glf-btn {
    font-size: 1.05rem;
  }

  .glf-step input {
    font-size: 1.8rem;
  }
}

.glf-wrapper.glf-touch .glf-choice {
  border-color: var(--glf-green);
  background: var(--glf-green);
  color: #ffffff;
}

.glf-wrapper.glf-touch .glf-choice:hover {
  border-color: var(--glf-green);
  background: var(--glf-green);
  color: #ffffff;
  box-shadow: none;
}

.glf-wrapper.glf-touch .glf-choice.is-selected {
  border-color: var(--glf-green);
  background: #d2e1db;
  color: var(--glf-green);
  box-shadow: 0 0 0 2px rgba(45, 119, 92, 0.25);
}

.glf-wrapper.glf-touch .glf-choice.is-selected:hover {
  border-color: var(--glf-green);
  background: #d2e1db;
  color: var(--glf-green);
  box-shadow: 0 0 0 2px rgba(45, 119, 92, 0.25);
}
