/* custom.css — global styles loaded on every page (template.html) */

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/montserrat-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --nhhs-navy: #002B4D;
  --nhhs-accent: #1F4766;
  --nhhs-text: #3B3D42;
  --nhhs-bg: #f3f6fd;
}

/* Permanently reserve the vertical scrollbar gutter. During load the page height
   oscillates around the viewport (DataTables init adds its search/pagination
   wrapper, then paginates the tbody; cards/images settle) which toggles the
   scrollbar on/off. Each toggle changes the viewport width by ~15px and slides
   the horizontally-centered .container sideways — the "jumps right-to-left twice"
   on pages like Superadmin and My Groups. Reserving the gutter keeps the content
   box width constant so the toggle no longer shifts anything. */
html {
  scrollbar-gutter: stable;
}

body {
  font-family: 'Montserrat', sans-serif !important;
  background-color: var(--nhhs-bg);
}

.container-background { background-color: var(--nhhs-bg); }

.navbar{ margin-bottom: 20px; }

.btn-admin { 
    background: linear-gradient(135deg, var(--nhhs-navy) 0%, #0a1f30 100%);
    border: none;
    color: white !important;
    padding: 0.7rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 27, 48, 0.25);
    transition: all 0.3s ease;
    margin-top: 0rem;
    display: inline-block;
}

.btn-admin:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 27, 48, 0.35);
}

.btn-primary {
  background: linear-gradient(135deg, var(--nhhs-accent) 0%, #1a3d5a 100%);
  box-shadow: 0 4px 12px rgba(31, 71, 102, 0.25);
  transition: all 0.3s ease;
  color: white !important;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(31, 71, 102, 0.35);
}

.cardLogo {
  max-width: 60%;
  max-height: 50%;
  margin-left: auto;
  margin-right: auto;
  display: block;
  -ms-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  margin: 0;
  position: absolute;
  top: 50%;
  left: 50%;
}

.card-footer{
  color: #ffffff;
  background-color: var(--nhhs-accent);
  text-align: center;
  padding: 0.75rem;
}

.logobox{ height: 210px; }

.card{
  margin: auto;
  margin-bottom: 15px;
  width: 100%;
}

.NoHover:hover{ text-decoration: none; }

.nhhs-navbar {
  background-color: #fff !important;
  border-bottom: 1px solid rgba(0,0,0,.06);
  padding-top: .8rem;
  padding-bottom: .8rem;
}

.nhhs-navbar .container-fluid {
  gap: .75rem;
  flex-wrap: nowrap;
  align-items: center;
}

.nhhs-navbar .navbar-brand {
  display: flex;
  align-items: center;
  white-space: nowrap;
  margin-right: .5rem;
  flex-shrink: 1;
  min-width: 0;
}

.nhhs-brand-img {
  height: 32px;
  width: auto;
  aspect-ratio: 1941 / 487; /* reserve width before the PNG loads — prevents navbar layout shift */
  flex-shrink: 0;
}

.nhhs-brand-text {
  color: var(--nhhs-navy);
  font-weight: 700;
  letter-spacing: .6px;
  margin-left: .5rem;
  white-space: nowrap;
  font-size: clamp(0.9rem, 4vw, 1.25rem);
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.nhhs-menu {
  gap: .95rem;
  font-weight: 500;
  align-items: center;
  flex-wrap: nowrap;
}

#navbar .nav-link {
  color: var(--nhhs-text) !important;
  position: relative;
  padding: .25rem .15rem;
  white-space: nowrap;
  font-size: .98rem;
  transition: color .25s ease;
}

#navbar .nav-link:hover,
#navbar .nav-item.active .nav-link {
  color: var(--nhhs-navy) !important;
}

#navbar .nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  height: 2px; width: 0%;
  background: var(--nhhs-navy);
  border-radius: 2px;
  transition: width .25s ease;
}

#navbar .nav-link:hover::after,
#navbar .nav-item.active .nav-link::after {
  width: 100%;
}

.nhhs-auth-item {
  margin-left: 0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

/* Lock the Google Sign-In widget to a fixed box. The GSI client injects an
   iframe that briefly renders mis-positioned before its script settles it;
   without a hard height the navbar grows ~36px and shoves the whole page down,
   then snaps back. A fixed height + clip keeps the navbar height constant.
   Scoped to .g_id_signin only — NOT .nhhs-auth-item — so the logged-in
   dropdown menu is still free to overflow. Matches data-width in template.html. */
.nhhs-auth-item .g_id_signin {
  width: 270px; /* GSI renders the iframe ~20px wider than data-width (250) */
  height: 44px;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.nhhs-auth-button {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .25rem .15rem;
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--nhhs-text) !important;
  position: relative;
  white-space: nowrap;
  font-size: .98rem;
  font-weight: 500;
  line-height: 1.2;
}

.nhhs-auth-item .dropdown {
  display: flex;
  align-items: center;
  position: relative;
}

.nhhs-auth-item .dropdown-menu {
  position: absolute !important;
  top: 100% !important;
  right: 0 !important;
  left: auto !important;
  margin-top: 0 !important;
}

.nhhs-auth-item .dropdown:hover .dropdown-menu {
  display: block;
}

.nhhs-auth-item .dropdown-toggle {
  padding-right: .15rem !important;
}

.nhhs-auth-button:focus {
  box-shadow: none;
}

.nhhs-auth-label {
  font: inherit;
}

.nhhs-auth-button:hover {
  color: var(--nhhs-navy) !important;
}

.nhhs-auth-button img,
.nhhs-auth-button .rounded-circle {
  flex: 0 0 auto;
  margin-top: 0;
}

.nhhs-auth-button::after {
  display: none !important;
}

.nhhs-auth-button.dropdown-toggle::after {
  display: none !important;
}

.navbar-toggler {
  border: none;
  padding: 0.25rem 0.5rem;
  flex-shrink: 0;
  flex-grow: 0;
  order: 3;
}

.navbar-toggler:focus { box-shadow: none; }

@media (min-width: 992px) {
.nhhs-navbar .navbar-collapse {
    justify-content: flex-end;
    align-items: center;
  }

.nhhs-menu {
    flex-wrap: nowrap;
  }
}

@media (max-width: 991.98px) {
.nhhs-navbar .container-fluid {
    flex-wrap: wrap;
    align-items: center;
  }

.nhhs-navbar .navbar-brand {
    order: 1;
    flex: 1 1 auto;
    margin-right: .25rem;
    min-width: 0;
  }

.nhhs-brand-text {
    display: inline-block;
    max-width: calc(100vw - 170px);
    font-size: clamp(.82rem, 3.7vw, 1.22rem);
  }

.navbar-toggler {
    order: 2;
    margin-left: auto;
  }

.nhhs-navbar .navbar-collapse {
    order: 3;
    flex-basis: 100%;
    margin-top: .5rem;
  }

.nhhs-menu {
    width: 100%;
    align-items: flex-start;
    gap: .25rem;
  }

#navbar .nav-link {
    display: block;
    width: 100%;
    text-align: left;
    padding: .5rem 0;
  }

.nhhs-auth-item,
  .nhhs-auth-item .dropdown {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

.nhhs-auth-button {
    width: 100%;
    justify-content: flex-start;
  }

.nhhs-auth-item {
    margin-left: 0;
    margin-top: .5rem;
  }

  /* On desktop the profile dropdown is an absolutely-positioned floating
     panel. In the collapsed mobile navbar that makes it overlay the other
     stacked nav links instead of sitting inline below the toggle button —
     drop it back into normal flow so it expands the list like an accordion
     instead of floating on top of the page. Only the position changes here;
     opening/closing is still entirely Bootstrap's own .show toggle — do not
     add a competing display rule, a `:hover` selector has higher specificity
     than `.show` and will fight it on touch devices that simulate hover on tap. */
.nhhs-auth-item .dropdown-menu {
    position: static !important;
    width: 100%;
    margin-top: .35rem !important;
    box-shadow: none;
    border: 1px solid rgba(0,0,0,.08);
  }

.nhhs-auth-item .dropdown-menu .dropdown-item {
    font-size: .98rem;
    padding: .55rem 1rem;
  }
}

@media only screen and (max-width: 770px) {
.card-footer{
        font-size: 12px;
    }
}

@media (max-width: 575.98px) {
.col-sm-6{
        max-width:50%;
     }

.btn-application {
         font-size: 0.75rem;
     }
}

@media (max-width: 370px) {
.col-sm-6{
        max-width:100%;
     }
}

.mb-2 a.text-decoration-none,
.mb-2 .btn-link {
    color: var(--nhhs-accent);
    font-weight: 500;
    transition: color 0.2s ease;
}

.mb-2 a.text-decoration-none:hover,
.mb-2 .btn-link:hover {
    color: var(--nhhs-navy);
    text-decoration: none;
}

.modal-header {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.modal-title {
    color: var(--nhhs-navy);
    font-weight: 600;
}

.modal-body {
    padding: 1.5rem;
    color: var(--nhhs-text);
}

.modal-scrollable-body {
    max-height: min(55vh, 420px);
    overflow-y: auto;
}

.change-reasons-list {
    padding-left: 1.2rem;
    margin-bottom: 0;
}

.change-reasons-list > li {
    margin-bottom: 0.55rem;
}

.change-reason-head {
    font-style: italic;
}

.change-reason-sublist {
    margin-top: 0.35rem;
    padding-left: 1.2rem;
    font-size: 0.88rem;
    color: #495057;
}

.change-reason-sublist > li {
    margin-bottom: 0.2rem;
}

.missing-fields-modal-header {
    background: #b42318;
    border-bottom-color: #8f1d13;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.missing-fields-title-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.missing-fields-icon {
    font-size: 2.05rem;
    line-height: 1;
}

.missing-fields-modal-header .btn-close {
    margin-left: auto;
}

.missing-fields-modal-actions {
    justify-content: flex-end;
}

.nav-link-secondary {
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
    margin-top: 0.7rem;
}

html,
body {
    height: 100%;
}

#wrap {
    min-height: 100%;
}

#main {
    overflow: auto;
    padding-bottom: 72px;
}

#footer {
    position: relative;
    margin-top: -72px;
    /* negative value of footer height */
    height: 72px;
    clear: both;
}

.dropdown a:hover {
    background-color: #f1f1f1
}

.show {
    display: block;
}

ul {
    padding: 0;
    list-style-type: none;
}

.selected {
    background: #ccc;
}

li a:hover {
    background: #fff;
}

body {
    background: var(--nhhs-bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1f2937;
}

.alert-secondary {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    padding: 1rem 1.25rem;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
    line-height: 1.5;
}

.form-text.text-muted {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

label {
    font-weight: 500;
    color: var(--nhhs-text);
    margin-bottom: 0.5rem;
}

.timeslot-picker {
    background: #f9fafc;
    border-radius: 10px;
    padding: 16px;
    margin-top: 10px;
}

.timeslot-dates {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 6px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.timeslot-date {
    background: white;
    border: 1px solid #e5e7eb;
    padding: 8px 10px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    min-width: 92px;
    flex: 0 0 auto;
    transition: all 0.15s ease;
}

.timeslot-date.selected,
.timeslot-date:hover {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    color: white;
    border-color: #1a1a1a;
}

.timeslot-times {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 6px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.timeslot-time {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 6px;
    text-align: center;
    font-size: 0.85rem;
    min-width: 88px;
    flex: 0 0 auto;
}

.btn-outline-primary {
    border: 2px solid var(--nhhs-accent);
    transition: all 0.25s ease;
}

.btn-outline-primary:hover {
    background: var(--nhhs-accent);
    color: white !important;
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.3);
    border: none;
    border-radius: 8px;
    padding: 12px 22px;
    font-weight: 600;
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(40, 167, 69, 0.4);
}

.btn-secondary {
    border-radius: 8px;
    padding: 12px 22px;
}

.form-builder-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.form-builder-modal-actions.missing-fields-modal-actions {
    justify-content: flex-end;
}

.form-builder-modal-actions .btn {
    min-width: 160px;
    min-height: 44px;
    padding: 0 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
}

.nhhs-footer {
    background-color: var(--nhhs-bg, #f3f6fd);
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
    border-bottom: 3px solid #002F6C;
    padding-bottom: 1rem;
}

.form-header h2 { color: #002F6C; font-weight: 700; }

.form-header p { color: #666; }

.form-group,
.mb-3 {margin-bottom: 1.5rem; }

.form-group.row,
.mb-3.row { margin-bottom: 1.5rem;}

.form-group label,
.col-form-label { 
    font-weight: 500;
    padding-top: calc(0.375rem + 1px);
    padding-bottom: calc(0.375rem + 1px);
}

.form-control,
.form-select {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: .7rem 1rem;
    transition: border-color .2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--nhhs-accent);
    box-shadow: 0 0 0 .2rem rgba(31, 71, 102, 0.15);
    outline: 0;
}

.timeslot-picker {
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 1.5rem;
    background: #f8f9fa;
}

.timeslot-date,
.timeslot-time {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: .9rem;
    text-align: center;
    cursor: pointer;
    transition: .2s;
    background: #fff;
}

.timeslot-date.selected,
.timeslot-time.selected {
    background: #002F6C;
    color: #fff;
    border-color: #002F6C;
}

.btn-submit {
    width: 100%;
    padding: 1rem;
    font-weight: 600;
    background: #28a745;
    border: none;
    border-radius: 8px;
    color: #fff;
}

.form-publish-actions {
    display: flex;
    gap: 12px;
}

.form-publish-actions .btn {
    min-width: 150px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-submit:hover { background: #218838; }

@media (max-width: 768px) {
.row > [class*="col-"] { flex: 0 0 100%; max-width: 100%; }

.new-listing-form .col-sm-2,
    .new-listing-form .col-sm-3,
    .new-listing-form .col-sm-5 { flex: 0 0 100%; max-width: 100%; margin-bottom: 0.5rem; }

.timeslot-dates { overflow-x: auto; display: flex; }

.timeslot-times { overflow-x: auto; display: flex; }

.timeslot-time { flex: 0 0 auto; margin-bottom: 0.5rem; }

.btn-lg { width: 100%; }
}

.new-listing-form input:invalid,
.new-listing-form select:invalid,
.new-listing-form textarea:invalid {
    border-left: 3px solid salmon;
}

.new-listing-form input:required:valid,
.new-listing-form select:required:valid,
.new-listing-form textarea:required:valid {
    border-left: 3px solid limegreen;
}
