/* =========================================================
   UniDash Index/Landing Page Styles
   File: assets/css/index.css
   ========================================================= */

/* ---------- Reset / Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--ud-text-strong);
  background: var(--ud-bg);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial,
    "Noto Sans", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  display: block;
}

:root {  
  --ud-border: var(--ud-border-subtle);
  --ud-text: var(--ud-text-strong);
  --ud-muted: var(--ud-text-muted);
  --ud-shadow-soft: var(--ud-shadow-soft);
  --ud-bar-h: 56px;
}

/* ---------- Layout ---------- */
.ud-location-main {
  min-height: 100vh;
  min-height: 100svh;
  width: 100%;
}

.ud-location-container {
  min-height: 100vh;
  min-height: 100svh;
  width: 100%;
  display: flex;
  align-items: stretch;
}

.ud-location-left {
  width: 52%;
  padding: 56px 56px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ud-location-right {
  width: 48%;
  position: relative;
  overflow: hidden;
  background: #f3f4f6;
}

.ud-location-hero {
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: cover;
}

/* ---------- Header / Text ---------- */
.ud-location-logo {
  width: 150px;
  height: auto;
  margin-bottom: 34px;
}

.ud-location-title {
  margin: 0 0 14px;
  font-size: 46px;
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ud-text);
}

.ud-location-subtitle {
  margin: 0 0 26px;
  max-width: 560px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ud-muted);
}

/* ---------- Form Row (NO GAP between bar and button) ---------- */
.ud-location-form {
  display: flex;
  align-items: stretch;
  gap: 0;
  max-width: 640px;
  width: 100%;
  box-shadow: var(--ud-shadow-soft);
}

.ud-location-form:focus-within {
  box-shadow: 0 0 0 4px rgba(184, 27, 132, 0.12), var(--ud-shadow-soft);
}

.ud-location-input-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 260px;
}

.ud-location-input-group {
  height: var(--ud-bar-h);
  display: flex;
  align-items: stretch;
  background: var(--ud-bg);
  border: 1px solid var(--ud-border);
  border-right: 0;
  border-radius: 0;
}

.ud-location-input {
  flex: 1 1 auto;
  height: 100%;
  border: 0;
  outline: none;
  padding: 0 16px;
  font-size: 15px;
  color: var(--ud-text);
  background: transparent;
}

.ud-location-input::placeholder {
  color: #9ca3af;
}

.ud-location-locate-btn {
  height: 100%;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border: 0;
  border-left: 1px solid var(--ud-border);
  background: var(--ud-bg);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  font-weight: 700;
  font-size: 14px;
  color: var(--ud-text-strong);
}

.ud-location-locate-btn:hover {
  background: #fafafa;
}

.ud-location-locate-btn:active {
  background: #f4f4f5;
}

.ud-location-locate-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ud-location-locate-icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  filter: var(--ud-primary);
}

.ud-location-submit-btn {
  height: var(--ud-bar-h);
  padding: 0 18px;
  border: 0;
  border-radius: 0;
  background: var(--ud-primary);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  min-width: 128px;
}

.ud-location-submit-btn:hover {
  background: var(--ud-brand);
}

.ud-location-submit-btn:active {
  transform: translateY(0.5px);
}

/* ---------- Suggestions Dropdown (UPDATED: EatSure icon + color scrollbar) ---------- */
.ud-location-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--ud-bar-h) + 6px);
  background: var(--ud-bg);
  border: 1px solid var(--ud-border);
  border-radius: 0;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.10);
  max-height: 320px;
  overflow: auto;
  z-index: 50;
  display: none;

  /* scrollbar for firefox */
  scrollbar-width: thin;
  scrollbar-color: var(--ud-primary) #efeff6;
}

.ud-location-suggestions::-webkit-scrollbar {
  width: 10px;
}

.ud-location-suggestions::-webkit-scrollbar-track {
  background: #efeff6;
}

.ud-location-suggestions::-webkit-scrollbar-thumb {
  background: var(--ud-primary);
  border-radius: 10px;
  border: 2px solid #efeff6;
}

.ud-location-suggestions::-webkit-scrollbar-thumb:hover {
  background: var(--ud-brand);
}

.ud-location-suggestions.show {
  display: block;
}

/* each row = icon + text like eatsure */
.ud-location-suggestion {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  border-bottom: 1px solid #eef0f6;
}

.ud-location-suggestion:last-child {
  border-bottom: 0;
}

.ud-location-suggestion:hover {
  background: #f8fafc;
}

.ud-location-suggestion-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 18px;
  margin-top: 2px;
}

.ud-location-suggestion-icon img {
  width: 18px;
  height: 18px;
  display: block;
  filter: var(--ud-primary);
}

.ud-location-suggestion-body {
  flex: 1;
  min-width: 0;
}

.ud-location-suggestion-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ud-text-strong);
  line-height: 1.2;
}

.ud-location-suggestion-sub {
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--ud-text-muted);
  line-height: 1.2;
}

.ud-location-suggestion-meta {
  padding: 12px 14px;
  font-size: 13px;
  color: var(--ud-text-muted);
}

/* ---------- Error ---------- */
.ud-location-error {
  margin-top: 10px;
  font-size: 13px;
  color: var(--ud-accent-danger);
  display: none;
}

.ud-location-error.show {
  display: block;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .ud-location-left {
    padding: 44px 40px 36px;
  }
  .ud-location-title {
    font-size: 42px;
  }
}

@media (max-width: 991px) {
  .ud-location-container {
    flex-direction: column;
  }

  .ud-location-left,
  .ud-location-right {
    width: 100%;
  }

  .ud-location-right {
    height: 46vh;
    min-height: 320px;
  }

  .ud-location-left {
    justify-content: flex-start;
    padding: 36px 20px 22px;
  }

  .ud-location-logo {
    margin-bottom: 22px;
    width: 140px;
  }

  .ud-location-title {
    font-size: 36px;
  }

  .ud-location-form {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    box-shadow: none;
  }

  .ud-location-input-group {
    border-right: 1px solid var(--ud-border);
    box-shadow: var(--ud-shadow-soft);
  }

  .ud-location-submit-btn {
    width: 100%;
    box-shadow: var(--ud-shadow-soft);
  }

  /* dropdown under input group in mobile still ok */
  .ud-location-suggestions {
    top: calc(var(--ud-bar-h) + 6px);
  }
}

@media (max-width: 420px) {
  .ud-location-title {
    font-size: 32px;
  }
  .ud-location-locate-btn {
    padding: 0 12px;
    gap: 8px;
  }
  .ud-location-locate-icon {
    width: 19px;
    height: 19px;
  }
}