:root {
  --primary-foreground: #ffffff;
  --cylinder-radius: 150px;
  --cylinder-height: 140px;
}

.perspective-1200 {
  perspective: 1200px;
}

.preserve-3d {
  transform-style: preserve-3d;
}

.backface-hidden {
  backface-visibility: hidden;
}

.wheel-container {
  position: relative;
  width: 240px;
  height: 68px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible;
  margin-top: -10px; /* Adjust wheel container upward */
  cursor: grab; /* Add grab cursor to indicate it can be dragged */
  touch-action: none; /* Prevent browser handling of all panning and zooming gestures */
}

/* Mobile styles for the wheel */
@media (max-width: 768px) {
  .wheel-container {
    width: 220px;
    margin: 0 auto;
    height: 100px; /* Increase height to prevent text overflow */
    overflow: visible !important;
    touch-action: none !important; /* Prevent browser handling of touch events */
    cursor: grab;
    z-index: 20; /* Ensure the wheel is above other elements */
  }

  .cylinder {
    left: 50px !important;
    height: 80px !important;
    touch-action: none !important;
  }

  /* Adjust mobile search input width */
  #mobileSearch {
    width: 100% !important;
    max-width: 300px;
  }

  /* Make sure the left/right hover areas are positioned correctly */
  .leftHoverArea {
    left: 0 !important;
    width: 20% !important;
    z-index: 25 !important;
  }

  .rightHoverArea {
    right: 0 !important;
    width: 20% !important;
    z-index: 25 !important;
  }

  /* Ensure proper spacing in the mobile menu form */
  #mobileWheelForm {
    position: relative;
    padding-top: 10px;
  }

  /* Adjust the position of search relative to the wheel */
  #mobileWheelForm .mt-14 {
    margin-top: 4rem !important;
  }

  /* Adjust the section appearance for better mobile display */
  .section {
    height: 40px !important;
    touch-action: none !important;
  }

  /* Make sure cylinder wrapper has proper dimensions */
  .cylinder-wrapper {
    height: 100px !important;
    margin-bottom: 20px;
    touch-action: none !important;
    z-index: 20 !important;
  }

  /* Ensure space between wheel and search */
  .wheelForm {
    gap: 2.5rem !important;
  }

  /* Add a visual indicator that the wheel is swipeable */
  .wheel-container::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 4px;
    background-color: rgba(70, 177, 224, 0.3);
    border-radius: 2px;
  }

  .chatbot-wrapper {
    height: 650px;
  }
}

@media (max-width: 480px) {
  .chatbot-wrapper {
    height: 600px;
  }
}

.wheel-container:active {
  cursor: grabbing; /* Change cursor when actively swiping */
}

.cylinder-wrapper {
  position: relative;
  transform-style: preserve-3d;
  width: calc(var(--cylinder-radius) * 2);
  height: var(--cylinder-height);
}

.cylinder {
  position: absolute;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.3s ease;
}
.section {
  position: absolute;
  height: var(--cylinder-height);
  transform-style: preserve-3d;
  cursor: pointer;
  overflow: hidden;
  backface-visibility: hidden;
  transform-origin: center center;
  left: 50%;
  top: 35%;
  margin-left: calc(var(--section-width) / -2);
  /* border-left: 1px solid rgba(200, 200, 200, 0.2); */
  /* border-right: 1px solid rgba(200, 200, 200, 0.2); */
}

.section-content {
  position: absolute;
  width: 100%;
  height: 30%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4b5563;
  font-size: 1rem; /* Increased from 0.8rem */
  font-weight: 500;
  text-align: center;
  transition: all 0.2s ease;
  backface-visibility: hidden;
  padding: 0 2px;
  letter-spacing: -0.2px;
}
.section-content:hover {
  transform: scale(1.08);
  transition: all 0.2s ease;
}

.section-content.selected {
  color: #46b1e0;
  font-weight: 600; /* Make selected item bolder */
}

.section-content.center {
  transform: scale(1.1); /* Make centered item slightly larger */
  font-weight: 600; /* Make centered item bolder */
}

.section-content.selected:hover {
  background-color: var(--primary);
}

/* Search box positioning */
.search-box-container {
  margin-left: 150px !important; /* Move search box much further to the right */
  position: relative;
  z-index: 10;
}

/* Main navigation menu positioning */
.main-nav-container {
  margin-left: auto !important; /* Push to the right edge of the container */
  padding-right: 25px !important; /* Add space from the right edge */
  display: flex;
  justify-content: flex-end;
  align-items: center;
  position: relative;
  z-index: 5;
  gap: 30px; /* Add spacing between menu items */
}

/* Large devices only (lg: 1024px to 1400px) */
@media (min-width: 1024px) and (max-width: 1400px) {
  .main-nav-container {
    gap: 20px; /* Reduce gap to 20px for lg devices only */
  }
}

/* Style for search box next to navigation */
.search-near-nav {
  /* margin-right: 20px; */
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  /* padding-right: 20px; */
}

/* Search button styles */
.search-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background-color: white;
  border: 1.5px solid #e5e7eb;
  border-radius: 50%;
  color: #4b5563;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  /* Using transform-origin to keep the button centered */
  transform-origin: center center;
}

.search-button:hover {
  background-color: #46b1e0;
  border-color: #46b1e0;
  color: white;
}

/* Ensure flex container properly distributes space */
.nav-flex-container {
  width: 100%;
  display: flex;
  justify-content: space-between;
}

#leftHoverArea,
#rightHoverArea {
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#leftHoverArea:hover,
#rightHoverArea:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

/* Chatbot iframe responsive styles */
.chatbot-wrapper {
  position: relative;
  width: 100%;
  height: 700px;
  overflow: hidden;
}

.chatbot-iframe {
  border: none;
  width: 100%;
  height: 100%;
  border-radius: 12px;
}
