html,
body {
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

h1:focus {
  outline: none;
}

a,
.btn-link {
  color: #0071c1;
}

.btn-primary {
  color: #fff;
  background-color: #1b6ec2;
  border-color: #1861ac;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
  padding-top: 1.1rem;
}

.valid.modified:not([type="checkbox"]) {
  outline: 1px solid #26b050;
}

.invalid {
  outline: 1px solid red;
}

.validation-message {
  color: red;
}

#blazor-error-ui {
  background: lightyellow;
  bottom: 0;
  box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
  display: none;
  left: 0;
  padding: 0.6rem 1.25rem 0.7rem 1.25rem;
  position: fixed;
  width: 100%;
  z-index: 1000;
}

#blazor-error-ui .dismiss {
  cursor: pointer;
  position: absolute;
  right: 0.75rem;
  top: 0.5rem;
}

.blazor-error-boundary {
  background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkw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0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=)
      no-repeat 1rem/1.8rem,
    #b32121;
  padding: 1rem 1rem 1rem 3.7rem;
  color: white;
}

.blazor-error-boundary::after {
  content: "An error has occurred.";
}

.loading-progress {
  position: relative;
  display: block;
  width: 8rem;
  height: 8rem;
  margin: 20vh auto 1rem auto;
}

.loading-progress circle {
  fill: none;
  stroke: #e0e0e0;
  stroke-width: 0.6rem;
  transform-origin: 50% 50%;
  transform: rotate(-90deg);
}

.loading-progress circle:last-child {
  stroke: #1b6ec2;
  stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
  transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
  position: absolute;
  text-align: center;
  font-weight: bold;
  inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
  content: var(--blazor-load-percentage-text, "Loading");
}

code {
  color: #c02d76;
}

.flex-1 {
  flex: 1;
}

.gap-16 {
  gap: 16px;
}

.checkbox-input {
  width: 18px;
  height: 18px;
  border: 2px solid #d1d5db;
  border-radius: 2px;
  background-color: transparent;
  cursor: pointer;
  appearance: none;
}

.checkbox-input:checked::after {
  content: "";
  position: relative;
  left: 4px;
  top: -7px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  display: inline-block;
}

.checkbox-input:checked {
  background-color: #0d6efd;
  border-color: #0d6efd;
}

/* TopHeader Styles */
.top-header {
  padding: 12px 12px 16px 20px !important;
  background: #f3f4f6;
  width: 300;
  height: 60;
  border-radius: Corner/Medium;
  gap: 6;
  angle: 0 deg;
  opacity: 1;
  padding: spacing-md;
  border-width: 1px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.organization-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background-color: #fff;
  cursor: pointer;
  padding: 12px !important;
  min-width: 300px;
  border-radius: 8px;
  transition: background-color 0.2s;
}

.organization-selector:hover {
  background-color: #f8f9fa;
}

.org-info h2 {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 2px;
}

.org-info p {
  font-size: 12px;
  color: #6b7280;
  margin: 0;
}

.dropdown-icon {
  width: 16px;
  height: 16px;
  color: #6b7280;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-container {
  position: relative;
  display: flex;
  align-items: center;
  width: 300px;
  max-width: 720px;
  height: 46px;
  background: #ffffff;
  border-radius: 50px;
  padding: 8px 8px 8px 16px;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}

.search-container input {
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 16px;
  color: #374151;
  padding-right: 50px;
}

.search-container input::placeholder {
  color: #9ca3af;
}

.search-icon-wrapper {
  position: absolute;
  right: 4px;
  width: 38px;
  height: 38px;
  background: #f3f4f6;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.search-icon-wrapper svg {
  width: 18px;
  height: 18px;
  color: #6b7280;
}

@media (max-width: 1024px) {
  .top-header {
    padding: 20px 24px;
  }

  .search-container {
    width: 250px;
  }
  .organization-selector {
    min-width: initial;
  }
}

@media (max-width: 768px) {
  .top-header {
    padding: 16px 20px;
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }

  .header-actions {
    justify-content: space-between;
  }

  .search-container {
    width: 100%;
    max-width: 300px;
  }
}

@media (max-width: 480px) {
  .top-header {
    padding: 12px 16px;
  }

  .header-actions {
    flex-direction: column;
    gap: 12px;
  }

  .search-container {
    width: 100%;
  }
}

/* Google Places Autocomplete Styles */
.address-search-wrapper {
  position: relative;
  width: 100%;
}

.address-search-container {
  position: relative;
  width: 100%;
}

.address-search-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 400;
  color: #111827;
  background-color: #fff;
  transition: all 0.2s;
  outline: none;
}

.address-search-input:focus {
  border-color: #005ECF;
  box-shadow: 0 0 0 3px rgba(0, 94, 207, 0.1);
}

.address-search-input::placeholder {
  color: #9CA3AF;
}

/* Form input inside address wrapper */
.address-search-wrapper .form-input {
  width: 100%;
}

/* Disabled select styling */
select:disabled,
select.disabled {
  background-color: #f3f4f6;
  cursor: not-allowed;
  opacity: 0.7;
}

/* Readonly input styling */
input[readonly] {
  background-color: #f9fafb;
  cursor: not-allowed;
}

.address-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-height: 250px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  margin-top: 4px;
}

.address-dropdown::-webkit-scrollbar {
  width: 8px;
}

.address-dropdown::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.address-dropdown::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.address-dropdown::-webkit-scrollbar-thumb:hover {
  background: #2563eb;
}

.dropdown-item {
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.dropdown-item:hover {
  background: linear-gradient(90deg, #eff6ff 0%, #dbeafe 100%);
  border-left: 3px solid #2563eb;
  padding-left: 13px;
}

.dropdown-item-main {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
}

.dropdown-item:hover .dropdown-item-main {
  color: #2563eb;
}

.dropdown-item-secondary {
  font-size: 13px;
  color: #6b7280;
}

.dropdown-item:hover .dropdown-item-secondary {
  color: #1d4ed8;
}

.hint-icon {
  display: inline-block;
  margin-right: 6px;
  color: #9CA3AF;
}

.dropdown-item:hover .hint-icon {
  color: #2563eb;
}

/* Authentication Loading State */
.auth-loading-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
  z-index: 9999;
  min-height: 100vh;
}

.auth-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e5e7eb;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: auth-spin 0.8s linear infinite;
}

.auth-loading-text {
  margin-top: 16px;
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
  letter-spacing: 0.01em;
}

@keyframes auth-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Page Loading Spinner */
.page-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e5e7eb;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: page-spin 0.8s linear infinite;
  margin: 20px auto;
}

.page-loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  min-height: 200px;
}

@keyframes page-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* LocationQuestion Styles */
.location-question-wrapper {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
}

.location-question-icon {
  cursor: help;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.location-question-wrapper:hover .location-question-icon {
  transform: scale(1.1);
}

.location-info-box {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  background: white !important;
  background-color: white !important;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08);
  padding: 16px;
  z-index: 999999999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
}

.location-info-box.show {
  visibility: visible;
  opacity: 1 !important;
  transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
}

.location-info-box::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: white !important;
  background-color: white !important;
  border-left: 1px solid #E5E7EB;
  border-top: 1px solid #E5E7EB;
  z-index: 1000;
}

.info-box-content {
  font-size: 13px;
  line-height: 1.6;
  color: #374151;
  font-weight: 400;
  position: relative;
  z-index: 2;
}

@media (max-width: 768px) {
  .location-info-box {
    width: 280px;
  }
}

@media (max-width: 480px) {
  .location-info-box {
    width: 250px;
    left: auto;
    right: 0;
    transform: none;
  }

  .location-info-box::before {
    left: auto;
    right: 16px;
    transform: rotate(45deg);
  }
}

:root {
  --brand: #1367e6; /* theme color */
  --splash-bg: #1367e6; /* solid splash background */
  --brand-900: #1367e6;
  --brand-700: #1367e6;
  --text-on-brand: #ffffff;
}
* {
  margin: 0;
  padding: 0;
  font-family: "Noto Sans", sans-serif;
}
html,
body,
#app {
  margin: 0;
  padding: 0;
  background-color: var(
    --splash-bg
  ); /* prevent white flash between loader and first paint */
}
/* Fade-in app to avoid white flash */
#app {
  min-height: 100vh;
  opacity: 0;
  transition: opacity 0.25s ease-out;
}
/* Loader overlay */
#app-loader {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--splash-bg);
  color: var(--text-on-brand);
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.25s ease-out, visibility 0.25s ease-out;
  visibility: visible;
}
#app-loader.fade-out {
  opacity: 0;
  visibility: hidden;
}
.brand-lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.logo-wrap {
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  border: 0;
  display: grid;
  place-items: center;
  box-shadow: none;
  animation: none;
}
.logo-wrap img,
.logo-wrap svg {
  width: 178px;
  height: auto;
  border-radius: 0;
  object-fit: contain;
}
.brand-name {
  margin-top: 14px;
  font: 600 14px/1.2 system-ui, Segoe UI, Inter, sans-serif;
  opacity: 0.9;
}
.progress-bar {
  margin-top: 16px;
  width: 120px;
  height: 3px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  overflow: hidden;
}
.progress-bar > span {
  display: block;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), #fff);
  animation: sweep 1400ms ease-in-out infinite;
}
@keyframes pop {
  0% {
    transform: scale(0.92);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
@keyframes sweep {
  0% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(40%);
  }
  100% {
    transform: translateX(120%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .logo-wrap {
    animation: none;
  }
  .progress-bar > span {
    animation: none;
    width: 100%;
    opacity: 0.35;
  }
}

/* Address Search Wrapper Styles */
.address-search-wrapper {
  position: relative;
  width: 100%;
}

.address-search-wrapper .form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s;
  background: #f9fafb;
  height: 48px;
  color: #111827;
}

.address-search-wrapper .form-control:focus {
  outline: none;
  border-color: #005ecf;
  background: white;
  box-shadow: 0 0 0 1px #005ecf;
}

.address-search-wrapper .form-control.invalid:focus {
  border-color: #ef4444;
  background: white;
  box-shadow: 0 0 0 1px #ef4444;
}

/* Address Dropdown Styles */
.address-search-wrapper .address-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  margin-top: 0;
}

.address-search-wrapper .address-dropdown.show {
  display: block !important;
}

.address-dropdown-item {
  padding: 12px 16px;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  gap: 12px;
  border-bottom: 1px solid #f3f4f6;
  min-height: 44px;
}

.address-dropdown-item:last-child {
  border-bottom: none;
}

.address-dropdown-item:hover {
  background-color: #f9fafb;
}

.address-dropdown-item-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: #6b7280;
  margin-top: 4px;
}

.address-dropdown-item-icon svg {
  width: 100%;
  height: 100%;
}

.address-dropdown-item-text {
  flex: 1;
  font-size: 14px;
  color: #111827;
  line-height: 1.5;
  word-wrap: break-word;
}
.address-dropdown-item-text-main {
  font-size: 14px;
  font-weight: 600;
}
.address-dropdown-item-text-secondary {
  font-size: 12px;
  font-weight: 500;
}
