/* Logo container - updated to flex layout */
.logo-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background-color: #e9ecef;
  border-bottom: 1px solid #ced4da;
  position: fixed;
  width: 100%;
  z-index: 1;
}

.logo-container img {
  height: 50px;
  max-width: 100%;
}

/* User avatar in logo container */
.logo-avatar {
  height: 42px !important;
  width: 42px !important;
  border-radius: 50%;
  border: 2px solid #fff;
  object-fit: cover;
}

/* If no avatar, keep logo centered */
.logo-container.no-avatar {
  justify-content: center;
}

.default-avatar {
  height: 42px !important;
  width: 42px !important;
  border-radius: 50%;
  border: 2px solid #fff;
  background-color: #ced4da;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #212529;
}

.default-avatar .material-icons {
  font-size: 28px;
}

/* Avatar Popup Modal */
.avatar-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}

.avatar-popup {
  background: white;
  position: relative;
  padding: 60px 20px 20px 20px;
  width: 100%;
  height: 100%;
}

/* Avatar positioned inside popup */
.avatar-popup .popup-avatar {
  position: absolute;
  top: 14px;
  right: 20px;
  height: 42px;
  width: 42px;
  border-radius: 50%;
  object-fit: cover;
  padding: 2px; /* Creates the border thickness */
  background: conic-gradient(
    from 0deg at 50% 50%,
    #212529 0deg 90deg,    /* Top left quarter - dark gray */
    #0d6efd 90deg 180deg,  /* Top right quarter - blue */
    #ffc107 180deg 270deg, /* Bottom right quarter - yellow */
    #dc3545 270deg 360deg  /* Bottom left quarter - red */
  );
}

.avatar-popup .popup-default-avatar {
  position: absolute;
  top: 14px;
  right: 20px;
  height: 42px;
  width: 42px;
  border-radius: 50%;
  border: 2px solid #6c757d;
  background-color: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c757d;
}

.avatar-popup .popup-default-avatar .material-icons {
  font-size: 28px;
}

/* Popup content */
.popup-content {
  padding-top: 10px;
}

.popup-welcome {
  margin-bottom: 8px;
}

.popup-welcome-text {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
}

.popup-user-info {
  margin-bottom: 20px;
}

.popup-user-email {
  font-size: 14px;
  color: #6c757d;
}

.popup-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.popup-action-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: transparent;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #1f2937;
  transition: all 0.2s;
  text-align: left;
  position: relative;
}

.popup-action-btn:hover {
  background: #f9fafb;
  border-color: #3b82f6;
}

.popup-action-btn.logout-btn {
  color: #dc2626;
  border-color: #fecaca;
}

.popup-action-btn.logout-btn:hover {
  background: #fef2f2;
  border-color: #dc2626;
}

.popup-close-btn {
  position: absolute;
  top: 15px;
  left: 15px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #6c757d;
  font-size: 20px;
  padding: 5px;
  border-radius: 50%;
  transition: all 0.2s;
}

.popup-close-btn:hover {
  background: #f3f4f6;
  color: #1f2937;
}

/* Make avatars clickable */
.logo-avatar,
.default-avatar {
  cursor: pointer;
  position: relative;
}

/* Avatar notification circle */
.avatar-notification {
  position: absolute;
  bottom: -2px;
  left: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: white;
  font-size: 10px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
  z-index: 5;
}

/* Wrappers */
.services-wrap, .subservices-wrap { background: transparent; }

/* Row items */
.service-item, .sub-item {
  width: 100%;
  background: #fff;
  border: 0;
  border-bottom: 1px solid #e5e7eb;
  padding: 14px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-align: left;
}

/* Keep arrow on the right; prevent it from dropping to the next line */
.service-item > div:first-child,
.sub-item > div:first-child { flex: 1 1 auto; min-width: 0; }

.service-spacer, .sub-spacer { flex: 0 0 auto; display: flex; align-items: center; color: #212529; }

.service-arrow, .sub-arrow { display: inline-flex; line-height: 1; font-size: 18px; color: #212529; }

/* Titles and metadata */
.service-title, .sub-title { font-size: 16px; font-weight: 600; color: #212529; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.service-meta  { font-size: 13px; color: #6c757d; }
.sub-meta  { font-size: 13px; color: #6c757d; }

/* Consistent last-row border removal on both screens */
.services-wrap .service-item:last-child,
.subservices-wrap .sub-item:last-child { border-bottom: 0; }

/* === Sliding Bottom Menu — icons always visible; menu moves up to reveal button === */
.bottom-nav {
  /* tune these two to your liking */
  --menu-base-h: 48px;

  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: var(--menu-base-h);
  transform: translateY(0);
  transition: height 220ms ease, transform 220ms ease;
  z-index: 9999;

  background: #e9ecef;            /* distinct from body */
  border-top: 1px solid #ced4da;   /* top border visible on the bar */
  padding: 6px 12px calc(6px + env(safe-area-inset-bottom, 0));
}

/* when expanded: the whole menu goes up and grows taller */
.bottom-nav.expanded {
  height: calc(var(--menu-base-h) + var(--menu-extra-h));
  transform: translateY(calc(-1 * var(--menu-extra-h)));
}

/* Button positioned outside the bottom menu, at the top-right */
.bottom-nav__handle {
  position: absolute;
  top: -30px;
  right: 20px;
  background: #e9ecef;
  padding: 10px;
  border-radius: 10px 10px 0 0;
  border: 1px solid #ced4da;
  border-bottom: 0;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 30px;
}

.bottom-nav__handle .material-icons {
  font-size: 20px; color: #6c757d; transition: transform 200ms ease;
}
.bottom-nav.expanded .bottom-nav__handle .material-icons { transform: rotate(180deg); }

/* icon row — icons only (no labels) */
.bottom-nav__icons {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px; align-items: center;
  height: 36px; /* fits inside base height with handle */
}
.bottom-nav__item {
  background: transparent; border: 0; padding: 6px 0; border-radius: 10px; cursor: pointer;
}
.bottom-nav__item:active { background: #eef2f7; }
.bottom-nav__item .material-icons { font-size: 24px; color: #212529; }

/* revealed area (button sits directly under icons, same div) */
.bottom-nav__extra {
  height: var(--menu-extra-h);
  display: flex; align-items: center;
  padding: 10px 8px 20px 8px;
}

/* button */
.emergency-btn {
  display: flex; gap: 10px; align-items: center; justify-content: center;
  width: 100%; padding: 10px 20px;
  background: #ffc107; color: #212529; text-decoration: none;
  font-weight: bold; font-size: 14px;
  border-radius: 8px; border: 1px solid #ffc107;
}
.emergency-btn:active { filter: brightness(0.95); }
.emergency-btn .material-icons { font-size: 20px; font-weight: bold;}

/* iOS safe area */
@supports (padding: max(0px)) {
  .bottom-nav { padding-bottom: max(6px, env(safe-area-inset-bottom)); }
}

/* customRequest */
.custom-request-wrap {
  max-width: 100%;
}

.custom-request-title {
  font-size: clamp(20px, 5vw, 24px);
  font-weight: bold;
  color: #1e40af;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.custom-request-subtitle {
  color: #1e40af;
  margin-bottom: 20px;
  font-size: 16px;
}

.custom-request-form {
  background-color: #fff;
}

.form-group {
  margin-bottom: 16px;
}

.form-group:last-of-type {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-weight: 600;
  color: #212529;
  margin-bottom: 12px;
  font-size: 16px;
}

.form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d2d2d2;
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
}

.form-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.form-textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #d2d2d2;
  border-radius: 8px;
  font-size: 14px;
  min-height: 120px;
  resize: vertical;
  box-sizing: border-box;
  font-family: inherit;
}

.form-textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.contact-info-title {
  font-weight: 600;
  color: #212529;
  margin-bottom: 12px;
  font-size: 16px;
}

.contact-info-box {
  font-size: 16px;
  color: #212529;
}

.contact-info-box p {
  margin: 4px 0;
}

.submit-button {
  width: 100%;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  border: none;
  font-size: 14px;
  transition: background-color 0.2s ease;
}

.submit-button.enabled {
  background-color: #10b981;
  color: white;
  cursor: pointer;
}

.submit-button.enabled:hover {
  background-color: #059669;
}

.submit-button.disabled {
  background-color: #9ca3af;
  color: white;
  cursor: not-allowed;
}

.back-button {
  margin-top: 20px;
  color: #3b82f6;
  background-color: transparent;
  border: none;
  cursor: pointer;
  font-size: 16px;
  transition: color 0.2s ease;
}

.back-button:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.divider-container {
  position: relative;
  width: 100%;
  height: 1px;
  background-color: #1e40af;
  margin: 30px 0;
}

.chevron-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chevron-icon svg {
  width: 16px;
  height: 16px;
  color: #1e40af;
}

.divider-container-bullet {
  position: relative;
  width: 100%;
  height: 1px;
  background-color: #e5e7eb;
  margin: 30px 0;
}

.bullet-icon {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  background-color: white;
  padding: 6px 6px 6px 0px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bullet-icon::before {
  content: '';
  width: 10px;
  height: 10px;
  background-color: #e5e7eb;
  border-radius: 50%;
  display: block;
}
