/**

 * UglyMugs Safety Web App - Custom Styles

 * 

 * Minimal CSS for app-specific functionality and overrides

 */



/* Suppress browser CSS warnings */

@supports (-webkit-text-size-adjust: 100%) {

  html {

    -webkit-text-size-adjust: 100%;

  }

}



@supports (-ms-text-size-adjust: 100%) {

  html {

    -ms-text-size-adjust: 100%;

  }

}



/* CSS Reset and normalization */

*,

*::before,

*::after {

  box-sizing: border-box;

}



/* Text size adjust moved to @supports blocks above */



/* iOS Safe Area Support */

.safe-area-top {

  padding-top: env(safe-area-inset-top);

}



.safe-area-bottom {

  padding-bottom: env(safe-area-inset-bottom);

}



/* Header system adjustments */

#main-header {

  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);

}



#page-header {

  top: 4rem; /* 64px - height of main header */

}



@media (max-width: 767px) {

  #page-header {

    top: 4rem;

  }

}



/* Prevent zoom on input focus for iOS */

@media screen and (max-width: 767px) {

  input[type="text"],

  input[type="email"],

  input[type="password"],

  input[type="tel"],

  select,

  textarea {

    font-size: 16px !important;

  }

}



/* Custom scrollbar for webkit browsers */

::-webkit-scrollbar {

  width: 4px;

}



::-webkit-scrollbar-track {

  background: transparent;

}



::-webkit-scrollbar-thumb {

  background-color: rgba(0, 0, 0, 0.2);

  border-radius: 2px;

}



/* Focus styles */

.focus-ring:focus {

  outline: 2px solid #c5002e;

  outline-offset: 2px;

}



/* Animation for screen transitions */

.screen-transition {

  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;

}



.screen-enter {

  opacity: 0;

  transform: translateX(100%);

}



.screen-enter-active {

  opacity: 1;

  transform: translateX(0);

}



.screen-exit {

  opacity: 1;

  transform: translateX(0);

}



.screen-exit-active {

  opacity: 0;

  transform: translateX(-100%);

}



/* Auth form switching animation */

.auth-form {

  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;

}



.auth-form.hidden {

  display: none;

}



.auth-form.active {

  display: block;

}



/* Navigation active state */

.nav-item.active {

  color: #c5002e !important;

}



/* Toast container positioning */

#toast-container {

  position: fixed !important;

  top: calc(4rem + 3rem + 1rem) !important; /* Main header + page header + spacing */

  right: 1rem !important;

  left: 1rem !important;

  z-index: 9998 !important;

  pointer-events: none !important;

  max-width: calc(100vw - 2rem) !important;

}



/* Individual toast styling */

.toast {

  transform: translateX(calc(100% + 1rem));

  opacity: 0;

  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  max-width: 420px;

  z-index: 9999;

  margin-left: auto;

  margin-right: 0;

  pointer-events: auto;

}



.toast.show {

  transform: translateX(0);

  opacity: 1;

}



.toast.success {

  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);

  border: 1px solid #bbf7d0;

  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  border-radius: 0.75rem;

  padding: 1rem;

  background-color: white;

}



.toast.error {

  background: linear-gradient(135deg, #fef2f2 0%, #fef7f7 100%);

  border: 1px solid #fecaca;

  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  border-radius: 0.75rem;

  padding: 1rem;

  background-color: white;

}



.toast.warning {

  background: linear-gradient(135deg, #fffbeb 0%, #fefce8 100%);

  border: 1px solid #fed7aa;

  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  border-radius: 0.75rem;

  padding: 1rem;

  background-color: white;

}



.toast.info {

  background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);

  border: 1px solid #bfdbfe;

  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  border-radius: 0.75rem;

  padding: 1rem;

  background-color: white;

}



/* Loading spinner for buttons */

.btn-loading {

  position: relative;

  color: transparent !important;

}



.btn-loading::after {

  content: "";

  position: absolute;

  width: 16px;

  height: 16px;

  top: 50%;

  left: 50%;

  margin-left: -8px;

  margin-top: -8px;

  border: 2px solid transparent;

  border-top-color: currentColor;

  border-radius: 50%;

  animation: spin 1s linear infinite;

}



/* Keyframe animations */

@keyframes spin {

  0% {

    transform: rotate(0deg);

  }

  100% {

    transform: rotate(360deg);

  }

}



@keyframes fadeIn {

  from {

    opacity: 0;

    transform: translateY(10px);

  }

  to {

    opacity: 1;

    transform: translateY(0);

  }

}



@keyframes slideUp {

  from {

    transform: translateY(100%);

    opacity: 0;

  }

  to {

    transform: translateY(0);

    opacity: 1;

  }

}



/* Utility classes */

.fade-in {

  animation: fadeIn 0.3s ease-out;

}



.slide-up {

  animation: slideUp 0.3s ease-out;

}



/* Bottom navigation specific styles */

#bottom-nav {

  position: fixed !important;

  bottom: 0 !important;

  left: 0 !important;

  right: 0 !important;

  z-index: 9999 !important;

  background-color: #ffffff !important;

  background: #ffffff !important;

  border-top: 1px solid #e5e7eb !important;

  height: 4rem !important; /* 64px - reduced from 80px */

  box-shadow: 0 -2px 8px 0 rgba(0, 0, 0, 0.15) !important;

  display: flex !important;

  backdrop-filter: none !important;

  opacity: 1 !important;

}



/* Disable nav during auth */

#bottom-nav.disabled {

  pointer-events: none;

  opacity: 0.5;

}



#bottom-nav.disabled .nav-item {

  cursor: not-allowed;

}



/* Ensure nav items are properly spaced */

#bottom-nav .nav-item {

  display: flex !important;

  flex-direction: column !important;

  align-items: center !important;

  justify-content: center !important;

  gap: 0.125rem !important; /* Reduced gap between icon and text */

  padding: 0.375rem 0.75rem !important; /* More horizontal padding for spacing */

  min-height: 3.5rem !important; /* Reduced to fit new nav height */

  flex: 1 !important;

  margin: 0 0.25rem !important; /* Add margin between nav items */

  border-radius: 0.5rem !important;

  transition: all 0.2s ease-in-out !important;

}



/* Icon styling within nav items */

#bottom-nav .nav-item svg {

  width: 1.25rem !important; /* Slightly smaller icons */

  height: 1.25rem !important;

}



/* Text styling within nav items */

#bottom-nav .nav-item span {

  font-size: 0.625rem !important; /* Smaller text */

  font-weight: 500 !important;

  line-height: 1 !important;

}



/* Hover and active states */

#bottom-nav .nav-item:hover {

  background-color: rgba(197, 0, 46, 0.1) !important;

  transform: translateY(-1px) !important;

}



#bottom-nav .nav-item.active {

  background-color: rgba(197, 0, 46, 0.15) !important;

}



#bottom-nav .nav-item.active svg,

#bottom-nav .nav-item.active span {

  color: #c5002e !important;

}



/* Ensure main content has bottom padding for nav */

#page-content {

  padding-bottom: 5rem !important; /* 80px - adjusted for new nav height */

}



/* Better touch targets for mobile */

@media (hover: none) and (pointer: coarse) {

  button,

  .nav-item,

  .btn-icon {

    min-height: 44px;

    min-width: 44px;

  }

}



/* Dark mode support */

@media (prefers-color-scheme: dark) {

  :root {

    color-scheme: dark;

  }

}



/* High contrast mode support */

@media (prefers-contrast: high) {

  .border-gray-200 {

    border-color: #000000;

  }

  

  .border-gray-300 {

    border-color: #000000;

  }

}



/* Reduced motion support */

@media (prefers-reduced-motion: reduce) {

  *,

  *::before,

  *::after {

    animation-duration: 0.01ms !important;

    animation-iteration-count: 1 !important;

    transition-duration: 0.01ms !important;

  }

}



/* Menu slide animation */

#menu-overlay {

  backdrop-filter: blur(4px);

}



#menu-overlay .transform {

  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);

}



/* Button loading state improvements */

.btn-loading::after {

  border-top-color: rgba(255, 255, 255, 0.8);

  border-right-color: rgba(255, 255, 255, 0.2);

  border-bottom-color: rgba(255, 255, 255, 0.2);

  border-left-color: rgba(255, 255, 255, 0.2);

}



/* Form input styling improvements */

input:focus,

select:focus,

textarea:focus {

  box-shadow: 0 0 0 2px rgba(197, 0, 46, 0.1);

  border-color: #c5002e;

}



/* App icon styling */

.app-icon {

  transition: transform 0.2s ease-in-out;

}



.app-icon:hover {

  transform: scale(1.05);

}



/* Better card shadows */

.card-shadow {

  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);

}



.card-shadow:hover {

  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);

}



/* Print styles */

@media print {

  .fixed,

  .sticky,

  #bottom-nav,

  #app-header,

  .toast,

  #menu-overlay {

    display: none !important;

  }

  

  #page-content {

    padding-bottom: 0 !important;

  }

} 



form .field.required label::after {

    content: " *";

    color: red;

}
/*custom checkbox for registration page starts here*/
  .chk-red{
    --chk-color: #c8102e;
    display:inline-flex;
    align-items:center;
    gap:.5rem;
    cursor:pointer;
    user-select:none;
    font-family: sans-serif;
  }

  .chk-red__input{
    position:absolute;
    opacity:0;
    /*width:0;
    height:0;*/
    pointer-events: none;
    width: 1px;
    height: 1px;
  }

  .chk-red__box{
    width:20px;
    height:20px;
    border: 2px solid #ccc; 
    border-radius:4px;
    background:#fff;
    position:relative;
    transition: all 0.2s ease-in-out;
  }

  /* when checked → red border + red tick */
  .chk-red__input:checked + .chk-red__box {
    border-color: var(--chk-color);
  }

  .chk-red__input:checked + .chk-red__box::after{
      content: "";
      position: absolute;
      left: 7px;
      top: -5px;
      width: 8px;
      height: 16px;
      border-right: 3px solid var(--chk-color);
      border-bottom: 3px solid var(--chk-color);
      transform: rotate(45deg);
      background: #fff;
  }

  .chk-red__input:focus-visible + .chk-red__box{
    outline:2px solid #94a3b8;
    outline-offset:2px;
  }

  .custom-checkbox-field {
      display: flex;
      gap: 10px;
      align-items: normal;
  }
/*custom checkbox for registration page ends here*/



/* Wrapper */
.tooltip {
  position: relative;
  display: inline-block;
}

/* Icon style */
.tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: #e5e7eb; /* light gray */
  color: #374151;           /* dark gray text */
  font-size: 12px;
  font-weight: bold;
  font-family: Arial, sans-serif;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
}

.tooltip-icon:hover {
  background-color: #d1d5db; /* slightly darker on hover */
}

/* Tooltip text */
.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%; /* above icon */
  left: 50%;
  transform: translateX(-50%);
  background-color: #111827; /* dark background */
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.4;
  min-width: 220px;
  max-width: 260px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-in-out;
  z-index: 10;
}

/* Arrow */
.tooltip::before {
  content: "";
  position: absolute;
  bottom: 115%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: #111827 transparent transparent transparent;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

/* Show tooltip on hover */
.tooltip:hover::after,
.tooltip:hover::before {
  opacity: 1;
}

.tooltippassword{
  position: absolute;
  top: -4px;
  right: 0;
}

form .field.required #incident-type-checkboxes label::after{content: '';}