/* ======================================================
   Footer Support Strip (Support + Newsletter)
   File: assets/css/footer-support.css
   Notes:
   - Desktop unchanged
   - Tablet/Mobile: dropdown panel + newsletter bar fixed (input full + button right)
====================================================== */

.hdaf-ss{
  background:var(--hdaf-ss-bg, #ff7a00) !important;
  padding:18px 0;
}

.hdaf-ss__inner{
  max-width:1500px;
  margin:0 auto;
  padding:0 18px;

  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:22px;
}

.hdaf-ss__left{flex:1;min-width:380px;}
.hdaf-ss__right{flex:1;min-width:380px;text-align:right;}

.hdaf-ss__title{
  font-weight:600;
  letter-spacing:.6px;
  text-transform:uppercase;
  font-size:22px;
  line-height:1.1;
  color:var(--hdaf-ss-text, #ffffff);
}

.hdaf-ss__sub{
  margin-top:4px;
  font-size:14px;
  color:var(--hdaf-ss-text, rgba(255,255,255,.86));
}

.hdaf-ss__actions{
  margin-top:14px;
  display:flex;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
}

.hdaf-ss__btn{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:12px 16px;
  background:var(--hdaf-ss-button-bg, #fff);
  border-radius:12px;
  text-decoration:none;
  color:var(--hdaf-ss-button-text, #111);
  font-weight:800;
  box-shadow:0 8px 22px rgba(0,0,0,.12);
}

.hdaf-ss__ic svg{width:20px;height:20px;display:block;}
.hdaf-ss__ic-img{width:20px;height:20px;display:block;}

/* Newsletter title (desktop) */
.hdaf-ss__n-title{
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:.4px;
  color:var(--hdaf-ss-text, #fff);
  font-size:16px;
  line-height:1.2;

  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* Desktop newsletter bar */
.hdaf-ss__form{
  margin-top:10px;
  display:inline-flex;
  align-items:center;
  gap:10px;
  background:#fff;
  border-radius:999px;
  padding:8px;
}

/* If markup uses a field wrapper, keep it inline on desktop too */
.hdaf-ss__field{
  display:flex;
  align-items:center;
  gap:10px;
}

.hdaf-ss__input{
  border:0;
  outline:none;
  width:420px;
  max-width:58vw;
  padding:10px 14px;
  border-radius:999px;
  font-size:15px;
}

.hdaf-ss__submit{
  border:0;
  cursor:pointer;
  padding:12px 22px;
  border-radius:999px;
  background:var(--hdaf-ss-newsletter-button-bg, #0f172a);
  color:var(--hdaf-ss-newsletter-button-text, #fff);
  font-weight:700;
  letter-spacing:.6px;
  text-transform:uppercase;
}

.hdaf-ss__note{
  margin-top:8px;
  font-size:12px;
  color:var(--hdaf-ss-text, rgba(255,255,255,.86));
}

.hdaf-ss__msg{
  margin-top:10px;
  font-weight:800;
  font-size:13px;
}

.hdaf-ss__msg--ok{color:#0b3;}
.hdaf-ss__msg--bad{color:var(--hdaf-ss-text, #ffffff);opacity:.9;}

/* Desktop defaults */
.hdaf-ss__help-toggle{display:none;}
.hdaf-ss__panel[hidden]{display:none !important;}

/* ==========================
   Tablet/Mobile
========================== */
@media (max-width:980px){

  .hdaf-ss{padding:16px 0;}

  .hdaf-ss__inner{
    flex-direction:column;
    align-items:stretch;
    gap:14px;
    padding-left:16px;
    padding-right:16px;
  }

  .hdaf-ss__left,
  .hdaf-ss__right{min-width:0;}

  /* Mobile/Tablet: show only dropdown button (hide desktop right block) */
  .hdaf-ss__right{display:none !important;}
  .hdaf-ss__desktop-actions{display:none !important;}

  /* Newsletter title: smaller + max 2 lines */
  .hdaf-ss__n-title{
    font-size:14px;
    white-space:normal;
    overflow:hidden;
    text-overflow:clip;

    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
  }

  .hdaf-ss__head{
    display:flex;
    flex-direction:column;
    gap:6px;
    align-items:center;
    text-align:center;
  }

  /* Hide ONLY head title/sub (panel subtitle should remain) */
  .hdaf-ss__head .hdaf-ss__title,
  .hdaf-ss__head .hdaf-ss__sub{display:none;}

  /* Dropdown button */
  .hdaf-ss__help-toggle{
    display:flex;
    align-items:center;
    justify-content:space-between;
    width:100%;
    gap:12px;

    background:#fff;
    border:0;
    border-radius:14px;
    padding:14px;
    cursor:pointer;

    box-shadow:0 10px 24px rgba(0,0,0,.14);
    -webkit-tap-highlight-color:transparent;
  }

  .hdaf-ss__help-toggle-text{
    flex:1;
    text-align:center;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.5px;
    color:var(--hdaf-ss-text, #ffffff);
    font-size:16px;
    line-height:1.1;
  }

  .hdaf-ss__help-toggle-chev{
    width:34px;
    height:34px;
    border-radius:10px;
    background:rgba(0,0,0,.06);
    display:inline-flex;
    align-items:center;
    justify-content:center;
    flex:0 0 auto;
  }
  .hdaf-ss__help-toggle-chev::before{
    content:"";
    width:10px;
    height:10px;
    border-right:2px solid rgba(0,0,0,.75);
    border-bottom:2px solid rgba(0,0,0,.75);
    transform:rotate(45deg);
    display:block;
  }
  .hdaf-ss__help-toggle[aria-expanded="true"] .hdaf-ss__help-toggle-chev::before{
    transform:rotate(-135deg);
  }

  /* Panel */
  .hdaf-ss__panel{
    margin-top:10px;
    border-radius:14px;
    padding:10px 10px 6px;
    background:rgba(255,255,255,.18);
  }

  /* Panel subtitle */
  .hdaf-ss__sub--panel{
    display:block;
    margin:6px 6px 10px;
    font-size:13px;
    color:var(--hdaf-ss-text, rgba(255,255,255,.86));
    text-align:center;
  }

  .hdaf-ss__actions{
    margin-top:0;
    justify-content:center;
    gap:12px;
  }

  .hdaf-ss__btn{
    width:100%;
    justify-content:center;
  }

  /* Panel newsletter spacing */
  .hdaf-ss__panel-newsletter{margin-top:12px;}

  /* ===============================
     FIX: Newsletter subscribe bar
     - full width
     - input expands
     - button stays on RIGHT
  =============================== */

  /* Make form a block container (bar) */
  .hdaf-ss__panel .hdaf-ss__form{
    width:100%;
    display:block;
    background:transparent;
    padding:0;
    border-radius:0;
    margin-top:10px;
  }

  /* The actual bar wrapper */
  .hdaf-ss__panel .hdaf-ss__field{
    width:100%;
    display:flex;
    align-items:center;
    gap:10px;

    background:#fff;
    border-radius:999px;
    padding:8px;
    box-sizing:border-box;
  }

  .hdaf-ss__panel .hdaf-ss__input{
    flex:1 1 auto;
    min-width:0;
    width:auto;
    max-width:100%;
    height:44px;
    padding:0 14px;
    border-radius:999px;
    box-sizing:border-box;
  }

  .hdaf-ss__panel .hdaf-ss__submit{
    flex:0 0 auto;
    height:44px;
    padding:0 18px;
    border-radius:999px;

    /* recommended button look */
    background:var(--hdaf-ss-newsletter-button-bg, #111827);
    color:var(--hdaf-ss-newsletter-button-text, #fff);
    font-weight:800;
    letter-spacing:.4px;
    box-shadow:0 8px 18px rgba(0,0,0,.12);
  }
}

/* Small phones */
@media (max-width:420px){
  .hdaf-ss__panel .hdaf-ss__input{height:42px;}
  .hdaf-ss__panel .hdaf-ss__submit{height:42px;padding:0 14px;}
}


/* Setup > Footer support controls */
.hdaf-ss,
.hdaf-ss__title,
.hdaf-ss__sub,
.hdaf-ss__n-title,
.hdaf-ss__note,
.hdaf-ss__msg,
.hdaf-ss__help-toggle-text,
.hdaf-ss__sub--panel{
  color: var(--hdaf-ss-text, #ffffff) !important;
}

.hdaf-ss__btn{
  background: var(--hdaf-ss-button-bg, #fff) !important;
  color: var(--hdaf-ss-button-text, #111) !important;
}

.hdaf-ss__btn svg,
.hdaf-ss__btn svg *{
  fill: currentColor;
  stroke: currentColor;
}

.hdaf-ss__submit,
.hdaf-ss__panel .hdaf-ss__submit{
  background: var(--hdaf-ss-newsletter-button-bg, #0f172a) !important;
  color: var(--hdaf-ss-newsletter-button-text, #fff) !important;
}

/* Setup-controlled Footer Support colors. */
.hdaf-ss{
  background: var(--hdaf-ss-bg, #ff7a00) !important;
  color: var(--hdaf-ss-text, #ffffff);
}

.hdaf-ss__title,
.hdaf-ss__sub,
.hdaf-ss__n-title,
.hdaf-ss__note,
.hdaf-ss__sub--panel{
  color: var(--hdaf-ss-text, #ffffff) !important;
}
.hdaf-ss__btn,
.hdaf-ss__help-toggle{
  background: var(--hdaf-ss-button-bg, #ffffff) !important;
  color: var(--hdaf-ss-button-text, #111111) !important;
}
.hdaf-ss__btn svg,
.hdaf-ss__help-toggle svg{
  fill: currentColor;
  color: currentColor;
}
.hdaf-ss__submit{
  background: var(--hdaf-ss-newsletter-button-bg, #0f172a) !important;
  color: var(--hdaf-ss-newsletter-button-text, #ffffff) !important;
}

/* Footer Tap To Top button. */
.hdaf-tap-top{
  position: fixed;
  z-index: 9998;
  right: 22px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--hdaf-tt-border, #e5e7eb);
  background: var(--hdaf-tt-bg, #ffffff);
  color: var(--hdaf-tt-color, #111111);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .18s ease, visibility .18s ease, transform .18s ease;
  box-shadow: 0 8px 22px rgba(15,23,42,.14);
}
.hdaf-tap-top--left{
  right: auto;
  left: 22px;
}
.hdaf-tap-top.is-visible{
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.hdaf-tap-top span{
  width: 11px;
  height: 11px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: translateY(3px) rotate(45deg);
  display: block;
}
.hdaf-tap-top:hover,
.hdaf-tap-top:focus-visible{
  transform: translateY(-2px);
  outline: none;
}
@media (max-width: 640px){
  .hdaf-tap-top{
    right: 16px;
    bottom: 18px;
    width: 42px;
    height: 42px;
  }
  .hdaf-tap-top--left{
    right: auto;
    left: 16px;
  }
}


/* Final fix: show "You Need Help?" title on tablet/mobile */
@media (max-width: 980px) {
	.hdaf-ss__head .hdaf-ss__title {
		display: block !important;
		margin: 0 0 4px;
		font-size: 20px;
		font-weight: 800;
		line-height: 1.12;
		letter-spacing: .4px;
		text-align: center;
		text-transform: uppercase;
		color: var(--hdaf-ss-text, #ffffff) !important;
		white-space: normal;
		overflow: visible;
		text-overflow: clip;
	}

	.hdaf-ss__head .hdaf-ss__sub {
		display: block !important;
		margin: 0 0 4px;
		font-size: 12px;
		font-weight: 400;
		line-height: 1.35;
		text-align: center;
		color: var(--hdaf-ss-text, #ffffff) !important;
		opacity: .92;
	}

	.hdaf-ss__help-toggle {
		margin-top: 4px;
	}
}

@media (max-width: 420px) {
	.hdaf-ss__head .hdaf-ss__title {
		font-size: 18px;
	}

	.hdaf-ss__head .hdaf-ss__sub {
		font-size: 11px;
	}
}


/* Final mobile/tablet footer support: title belongs inside the white dropdown button */
@media (max-width: 980px) {
	.hdaf-ss {
		padding: 12px 0;
	}

	.hdaf-ss__inner {
		gap: 0;
		padding-right: 16px;
		padding-left: 16px;
	}

	.hdaf-ss__head {
		display: block !important;
		text-align: initial;
	}

	.hdaf-ss__head .hdaf-ss__title,
	.hdaf-ss__head .hdaf-ss__sub {
		display: none !important;
	}

	.hdaf-ss__help-toggle {
		display: flex !important;
		align-items: center;
		justify-content: space-between;
		width: 100%;
		min-height: 44px;
		margin: 0;
		padding: 0 12px;
		border: 0;
		border-radius: 10px;
		background: #fff !important;
		color: #111 !important;
		box-shadow: none !important;
		cursor: pointer;
		-webkit-tap-highlight-color: transparent;
	}

	.hdaf-ss__help-toggle-text {
		flex: 1 1 auto;
		min-width: 0;
		text-align: left;
		font-size: 13px;
		font-weight: 800;
		line-height: 1.2;
		letter-spacing: .35px;
		text-transform: uppercase;
		color: #111 !important;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.hdaf-ss__help-toggle-chev {
		flex: 0 0 auto;
		width: 28px;
		height: 28px;
		border: 1px solid rgba(15, 23, 42, .10);
		border-radius: 9px;
		background: #f8fafc !important;
		color: #111;
	}

	.hdaf-ss__help-toggle-chev::before {
		width: 8px;
		height: 8px;
		border-right: 2px solid currentColor;
		border-bottom: 2px solid currentColor;
	}

	.hdaf-ss__panel {
		margin-top: 10px;
		border-radius: 12px;
		padding: 10px;
		background: rgba(255, 255, 255, .14);
	}

	.hdaf-ss__sub--panel {
		display: block !important;
		margin: 2px 2px 10px;
		font-size: 12px;
		font-weight: 400;
		line-height: 1.35;
		text-align: center;
		color: var(--hdaf-ss-text, #ffffff) !important;
		opacity: .92;
	}
}

@media (max-width: 420px) {
	.hdaf-ss__help-toggle {
		min-height: 42px;
		padding: 0 10px;
	}

	.hdaf-ss__help-toggle-text {
		font-size: 12px;
	}

	.hdaf-ss__help-toggle-chev {
		width: 26px;
		height: 26px;
	}
}
