/* WHS Termini – Public UI */
.whs-termini {
  --whs-primary: rgba(17,17,17,1);
  --whs-accent: rgba(17,17,17,1);
  --whs-bg: rgba(255,255,255,1);
  --whs-text: rgba(17,17,17,1);
  --whs-border: rgba(0,0,0,.14);
  --whs-radius: 16px;

  font-family: inherit;
  color: var(--whs-text);
  /* Prevent weird auto font scaling on some mobile browsers */
  -webkit-text-size-adjust: 100%;
}

.whs-termini * { box-sizing: border-box; }

.whs-t-card {
  border: 1px solid var(--whs-border);
  border-radius: var(--whs-radius);
  background: var(--whs-bg);
  padding: 14px;
}

.whs-t-head {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.whs-t-title {
  font-size: 18px;
  font-weight: 900;
  line-height: 1.1;
}

.whs-t-sub {
  opacity: .75;
  line-height: 1.35;
}

.whs-t-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 860px) {
  .whs-t-grid { grid-template-columns: 1fr; }
}

.whs-t-field label {
  display: block;
  font-weight: 800;
  margin-bottom: 6px;
}

.whs-t-input, .whs-t-select, .whs-t-textarea {
  width: 100%;
  border: 1px solid var(--whs-border);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  color: var(--whs-text);
  outline: none;
  /* iOS Safari: avoid zoom-in on focus by keeping 16px+ */
  font: inherit;
  font-size: 16px;
  line-height: 1.2;
}

.whs-t-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

.whs-t-textarea { min-height: 90px; resize: vertical; }

.whs-t-help {
  margin-top: 6px;
  font-size: 12px;
  opacity: .7;
  line-height: 1.35;
}

.whs-t-loading { animation: whs-pulse 1s ease-in-out infinite; }
@keyframes whs-pulse { 0%,100% { opacity:.7 } 50% { opacity:.3 } }

.whs-t-row {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

/* Calendar + time (50/50) */
.whs-calrow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
  margin-top: 12px;
}

@media (max-width: 860px) {
  .whs-calrow { grid-template-columns: 1fr; }
}

.whs-cal {
  border: 1px solid var(--whs-border);
  border-radius: 14px;
  overflow: hidden;
}

.whs-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--whs-border);
  background: rgba(0,0,0,.03);
}

.whs-cal-head .m {
  font-weight: 900;
}

.whs-btn {
  border: 1px solid var(--whs-border);
  background: #fff;
  border-radius: 999px;
  padding: 8px 10px;
  font-weight: 900;
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  line-height: 1;
  min-height: 44px;
  touch-action: manipulation;
}

.whs-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.whs-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
}

.whs-cal-dow {
  font-weight: 900;
  font-size: 12px;
  opacity: .75;
  text-align: center;
}

.whs-day {
  border: 1px solid var(--whs-border);
  border-radius: 12px;
  padding: 10px 0;
  text-align: center;
  font-weight: 900;
  cursor: pointer;
  background: #fff;
  user-select: none;
  min-height: 44px;
  touch-action: manipulation;
}

.whs-day.is-empty {
  border-color: transparent;
  background: transparent;
  cursor: default;
}

.whs-day.is-closed {
  opacity: .35;
  cursor: not-allowed;
}

.whs-day.is-has {
  border-color: rgba(0,0,0,.18);
}

.whs-day.is-selected {
  background: var(--whs-primary);
  color: var(--whs-bg);
  border-color: var(--whs-primary);
}

.whs-slots {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 860px) {
  .whs-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .whs-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.whs-slot {
  border: 1px solid var(--whs-border);
  border-radius: 999px;
  padding: 10px 12px;
  text-align: center;
  font-weight: 900;
  background: #fff;
  cursor: pointer;
  min-height: 44px;
  touch-action: manipulation;
}

.whs-slot.is-selected {
  background: var(--whs-accent);
  color: var(--whs-bg);
  border-color: var(--whs-accent);
}

.whs-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--whs-border);
  border-radius: 999px;
  padding: 12px 14px;
  background: var(--whs-primary);
  color: var(--whs-bg);
  font-weight: 900;
  cursor: pointer;
  font: inherit;
  min-height: 48px;
  touch-action: manipulation;
}

/* Extra tightening for very small screens */
@media (max-width: 380px) {
  .whs-cal-grid { gap: 6px; padding: 10px; }
  .whs-day { padding: 8px 0; font-size: 13px; }
  .whs-cal-dow { font-size: 11px; }
}

.whs-submit:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.whs-msg {
  border: 1px solid var(--whs-border);
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(0,0,0,.04);
  font-weight: 800;
  font-size: 16px;
  line-height: 1.35;
  box-shadow: 0 10px 26px rgba(0,0,0,.08);
  scroll-margin-top: 90px;
}

.whs-msg.is-error {
  background: rgba(239,68,68,.16);
  border-color: rgba(239,68,68,.45);
}

.whs-msg.is-ok {
  background: rgba(34,197,94,.16);
  border-color: rgba(34,197,94,.45);
}

@media (max-width: 520px) {
  .whs-msg {
    font-size: 17px;
    padding: 14px 14px;
  }
}




/* Action (cancel/confirm) message at the top */
.whs-msg-action{font-size:18px;padding:16px 18px;margin:12px 0 18px;border-radius:14px;}
@media (max-width:600px){.whs-msg-action{font-size:16px;padding:14px 14px;}}
.whs-msg.is-busy{background:rgba(2,132,199,.10);border-color:rgba(2,132,199,.35);color:#0c4a6e;}
.whs-msg-action.is-busy{background:rgba(2,132,199,.12);border-color:rgba(2,132,199,.40);color:#0c4a6e;}
