/* This is the css of select options of unit changing container*/
.modern-select {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 14px;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
}

/* This is the css of select options of unit changing container*/
.modern-select:hover {
  background: rgba(255, 102, 0, 0.15);
  border-color: #ff6600;
}

/* This is the css of select options of unit changing container*/
.modern-select:focus {
  outline: none;
  border-color: #ff6600;
  box-shadow: 0 0 8px rgba(255, 102, 0, 0.4);
}

/* Dropdown options styling */
.modern-select option {
  background-color: #2b2b2b;
  color: #fff;
  padding: 10px;
}

/* This is the css of unit changing container*/
#unitContainer {
  position: absolute;
  right: 16px;
  top: 25%;
  display: none;
  padding: 16px;
  background: rgba(25, 25, 25, 0.75);
  backdrop-filter: blur(12px);
  border-radius: 14px;
  box-shadow: 0px 8px 25px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-family: 'Segoe UI', Roboto, sans-serif;
  width: 220px;
  color: #fff;
}

#globalMessageBox {
  display: none;
  position: fixed;
  top: 13%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 300px;
  background-color: rgba(182, 167, 167, 0.85);
  /* techie blackish */
  color: #4CAF50;
  /* default text color (green) */
  padding: 12px 20px;
  border-radius: 10px;
  z-index: 9999;
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.3px;
  backdrop-filter: blur(6px);
  /* subtle glassy effect */
  box-shadow: 0 4px 12px rgba(26, 177, 232, 0.85);
  transition: opacity 0.3s ease;
}

.tooltip {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

/* Tooltip text */
.tooltip .tooltiptext {
  visibility: hidden;
  width: 220px;
  background: rgba(0, 0, 0, 0.85);
  /* blackish techie bg */
  color: #00d2d6;
  /* your text color */
  text-align: left;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.4;

  /* Position */
  position: absolute;
  z-index: 1;
  bottom: 125%;
  /* show above icon */
  left: 50%;
  transform: translateX(-50%);

  /* Small arrow */
  opacity: 0;
  transition: opacity 0.3s;
}

.tooltip .tooltiptext::after {
  content: "";
  position: absolute;
  top: 100%;
  /* arrow at bottom of tooltip */
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: rgba(0, 0, 0, 0.85) transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

/* Theme */
:root {
  --bg: #1a1212;
  --surface: #2b2b2b;
  --modal-bg: #242424;
  --header: #69605a;
  --text: #e6e6e6;
  --muted: #bdbdbd;
  --muted-icon: #bdbdbd;
  --muted-subtitle: #04a6c0;
  --accent: #ea8604;
  --danger: #db2828;
  --white: #ffffff;
  --black: #000000;
  --export-btn-text: #5f6060;
  --shadow-dark: #111;
  --header-border: #000000;

  --ring: 0 0 0 2px rgba(234, 134, 4, .35);
  --radius: 16px;
  --shadow: 0 12px 28px rgba(0, 0, 0, .45);
}

/* Modal */
.ui.modal#measurementExportDiv {
  background: var(--modal-bg);
  color: var(--modal-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* Header */
.export-header {
  background: var(--header) !important;
  border-bottom: 2px solid var(--header-border) !important;
}

.export-title-wrap {
  display: flex;
  align-items: center;
  gap: .6rem;
}

.export-title-wrap .icon {
  color: var(--accent);
}

.export-header h3 {
  margin: 0;
  font-weight: 600;
  color: var(--text);
}

/* Content */
.export-content {
  background: var(--modal-bg) !important;
  padding: 1.25rem 1.5rem;
  border-bottom: 2px solid var(--header-border);
}

.export-fieldset {
  border: 1px solid var(--black);
  border-radius: var(--radius);
  padding: 1rem;
}

.export-legend {
  font-size: .95rem;
  color: var(--muted);
  padding: 0 .4rem;
}

/* Choice cards */
.export-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: .75rem;
  margin-top: .75rem;
}

.hud-fetching-text {
    margin-top: 12px;
    font-size: 16px;
    color: #00eaff;
    letter-spacing: 0.6px;
    text-align: center;
    opacity: 0;
    animation: fadeInFetch 0.7s forwards, pulseFetch 2s infinite ease-in-out;
}

@keyframes fadeInFetch {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulseFetch {
    0%, 100% { opacity: 0.6; }
    50%      { opacity: 1; }
}

.radio-card {
  position: relative;
  display: block;
  border-radius: var(--radius);
  background: var(--header);
  border: 1px solid rgba(255, 255, 255, .08);
  cursor: pointer;
  user-select: none;
  transition: transform .07s ease, border-color .15s ease, box-shadow .15s ease;
}

.radio-card:hover {
  transform: translateY(-1px);
  border-color: rgba(234, 134, 4, .35);
}

.radio-card:has(input:focus-visible) {
  box-shadow: var(--ring);
}

.radio-card input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.radio-card__body {
  display: flex;
  gap: .75rem;
  align-items: center;
  padding: .9rem;
}

.radio-card__body .icon {
  font-size: 1.25rem;
  color: var(--muted-icon);
}

.radio-card__title {
  display: block;
  font-weight: 600;
  color: var(--white);
}

.radio-card__subtitle {
  display: block;
  font-size: .85rem;
  color: var(--muted-subtitle);
}

/* Selected state */
.radio-card:has(input:checked) {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent) inset, var(--ring);
}

.radio-card:has(input:checked) .icon {
  color: var(--accent);
}

/* Actions */
.export-actions {
  background: var(--header) !important;
  display: flex;
  gap: .75rem;
  justify-content: flex-end;
  padding: .9rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, .1);
}

.export-actions .ui.button {
  border-radius: 999px;
  box-shadow: 1px 2px 2px 2px var(--shadow-dark);
}

/* Cancel = red pill */
.export-actions .ui.button.cancel {
  background: var(--danger);
  color: var(--white);
}

/* Export = white pill */
.export-actions .ui.button.export {
  background: var(--white);
  color: var(--export-btn-text);
  font-weight: 600;
}

/* Modal */
.ui.modal#customConfirmDiv {
  background: var(--modal-bg);
  color: var(--modal-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  max-width: 420px;
  /* smaller than export modal */
}

/* Header */
.confirm-header {
  background: var(--header) !important;
  border-bottom: 2px solid var(--accent) !important;
}

.confirm-title-wrap {
  display: flex;
  align-items: center;
  gap: .6rem;
}

.confirm-title-wrap .icon {
  color: var(--accent);
}

.confirm-header h3 {
  margin: 0;
  font-weight: 600;
  color: var(--text);
}

/* Content */
.confirm-content {
  background: var(--modal-bg) !important;
  padding: 1.25rem 1.5rem;
  border-bottom: 2px solid var(--accent);
  font-size: .95rem;
  color: var(--white);
  text-align: center;
}

/* Actions */
.confirm-actions {
  background: var(--header) !important;
  display: flex;
  gap: .75rem;
  justify-content: flex-end;
  padding: .9rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, .1);
}

.confirm-actions .ui.button {
  border-radius: 999px;
  box-shadow: 1px 2px 2px 2px var(--shadow-dark);
  min-width: 90px;
}

/* Cancel button */
.confirm-actions .ui.button.cancel {
  background: var(--danger);
  color: var(--white);
}

/* OK button */
.confirm-actions .ui.button.export {
  background: var(--white);
  color: var(--export-btn-text);
  font-weight: 600;
}

.dropdown-profile {
  display: none;
  position: absolute;
  right: 0;
  top: 50px;
  /* below profile pic */
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  min-width: 260px;
  z-index: 1000;
  font-family: Arial, sans-serif;
  overflow: hidden;
}

.dropdown-profile button {
  cursor: pointer;
}

.dropdown-profile-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* centers horizontally */
  justify-content: center;
  padding: 15px;
  text-align: center;
}

.export-close-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 22px;
  font-weight: bold;
  color: rgb(254, 115, 0);
  cursor: pointer;
  z-index: 2000;
  transition: color 0.2s ease;
}

.export-close-btn:hover {
  color: #f00d0d;
  /* orange hover */
}

#settingsDiv {
  background-color: #69605a;
  border-radius: 16px;
  color: #ccc;
}

/* --- Header --- */
#settingsDiv .header {
  background-color: #69605a;
  border-radius: 16px 16px 0 0;
  text-align: center;
  color: #ffffff;
  padding: 10px;
}

/* --- Inner Content --- */
#settingsDiv .content {
  background-color: #2b2b2b;
  display: flex;
  flex-direction: column;
  /* border-radius: 0 0 16px 16px; */
}

.export-footer {
  border-radius: 16px 16px 0 0;
  text-align: center;
  color: #ffffff;
  padding: 10px;
}

/* Responsive */
@media (max-width: 520px) {
  .export-actions {
    flex-direction: column-reverse;
  }

  .export-actions .ui.button,
  .export-actions .ui.primary.button {
    width: 100%;
  }
}

/* --- Drawer Button --- */
.drawer-toggle {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 50%;
  background: #e6e6e6;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 15px rgba(99, 102, 241, 0.25);
  transition: all 0.3s ease;
  z-index: 999;
}

.drawer-toggle:hover {
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
}

/* --- The 3 Lines --- */
.drawer-lines {
  position: relative;
  width: 20px;
  height: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.drawer-lines span {
  display: block;
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, #6366f1, #f2711c);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* --- When Opened → turns into X --- */
.drawer-toggle.open .drawer-lines span:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}

.drawer-toggle.open .drawer-lines span:nth-child(2) {
  opacity: 0;
}

.drawer-toggle.open .drawer-lines span:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

/* --- Pulse Attention Animation --- */
@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4), 0 0 0 0 rgba(242, 113, 28, 0.3);
    transform: translateX(-50%) scale(1);
  }

  50% {
    box-shadow: 0 0 0 10px rgba(99, 102, 241, 0.1), 0 0 0 20px rgba(242, 113, 28, 0.05);
    transform: translateX(-50%) scale(1.05);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.1), 0 0 0 0 rgba(242, 113, 28, 0.05);
    transform: translateX(-50%) scale(1);
  }
}

/* Apply pulse until clicked */
.drawer-toggle.pulse {
  animation: pulseGlow 2s infinite ease-in-out;
}

/* --- new tour shepherd --- */
/*  Modern Shepherd Box Styling */
.shepherd-theme-custom.shepherd-element {
  background: #ffffff !important;
  border-radius: 16px !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15) !important;
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 0 !important;
  overflow: hidden;
  transition: all 0.3s ease-in-out;
}

/* Add subtle hover lift */
.shepherd-theme-custom.shepherd-element:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

/* Header (for video or image section) */
.shepherd-theme-custom .shepherd-header {
  background: linear-gradient(135deg, #fffffe, #fffffe);
  color: white;
  /* padding: 10px; */
  font-weight: 600;
}

/* Video or image container */
.shepherd-theme-custom .shepherd-content video,
.shepherd-theme-custom .shepherd-content img {
  width: 100%;
  border-bottom: 1px solid #eee;
  border-radius: 16px 16px 0 0;
}

/* Text content area */
.shepherd-theme-custom .shepherd-text {
  padding: 16px;
  color: #333;
  font-size: 15px;
  line-height: 1.5;
}

/* Buttons area */
.shepherd-theme-custom .shepherd-footer {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #eee;
  padding: 10px 16px;
}

/* Modern buttons */
.shepherd-theme-custom .shepherd-button {
  border-radius: 8px;
  font-weight: 600;
  padding: 8px 14px;
  transition: background 0.3s ease;
}

.shepherd-theme-custom .shepherd-button-primary {
  background: linear-gradient(135deg, #04a6c0, #04a6c0);
  color: white;
  border: none;
}

.shepherd-theme-custom .shepherd-button-primary:hover {
  background: linear-gradient(135deg, #04a6c0, #04a6c0) !important;
  color: white !important;
  border: none !important;
}

/* General Shepherd GIF & Image Handling */
.shepherd-theme-custom .shepherd-content img,
.shepherd-theme-custom .shepherd-content video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px 12px 0 0;
  /* soft top corners only */
  object-fit: cover;
  /* fills nicely without distortion */
  margin: 0;
  padding: 0;
  border: none;
}

/* Circular logo for the welcome step only */
.shepherd-theme-custom .tour-card img.tour-avatar {
  width: 100px;
  aspect-ratio: 1 / 1;
  /* ensures perfect square */
  object-fit: contain;
  border-radius: 50%;
  display: block;
  margin: 16px auto 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: none;
}


/* Info section styling */
.shepherd-theme-custom .tour-info {
  padding: 14px 16px 10px;
  text-align: center;
}

.shepherd-theme-custom .tour-info h3,
.shepherd-theme-custom .tour-info h4 {
  margin: 0 0 6px 0;
  font-weight: 600;
  color: #333;
}

.shepherd-theme-custom .tour-info p {
  margin: 0;
  color: #555;
  font-size: 14px;
  line-height: 1.5;
}

.info-item {
  margin-bottom: 24px;
}

.info-item label {
  display: block;
  color: #888;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.info-value {
  color: #fff;
  font-size: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-weight: 400;
}

/* Add a subtle highlight to the value */
.info-value:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.1);
}

.sidebar-buttons {
  display: flex;
  flex-direction: column;
  /* Put them one below another (clean vertical stack) */
  gap: 10px;
  /* Space between the buttons */
  width: 100%;
  /* Fit the sidebar width */
  margin-top: 15px;
}

.sidebar-action-btn {
  width: 100%;
  /* Button stretches to full width */
}

.girth-active {
  background-color: #04a6c0 !important;
  color: #fff !important;
}

/* Smooth button transitions */
.smooth-button-container {
  opacity: 1;
  max-height: 100px;
  /* Enough for button+margin */
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(0);
}

.smooth-button-container.is-hidden {
  opacity: 0;
  max-height: 0;
  transform: translateY(-10px);
  pointer-events: none;
  margin-top: 0 !important;
}

#ID_INPUT_webhookUrl::placeholder {
  color: #999;
  /* placeholder color */
  opacity: 1;
  /* important for Firefox */
}

/* Browser compatibility */
#ID_INPUT_webhookUrl::-webkit-input-placeholder {
  color: #999;
}

#ID_INPUT_webhookUrl::-moz-placeholder {
  color: #999;
}

#ID_INPUT_webhookUrl:-ms-input-placeholder {
  color: #999;
}

.settings-section {
  padding: 10px 0 10px 18px;
  border-bottom: 1px solid #ea8604;
}

.webhook-section label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ccc;
  font-size: 14px;
  font-weight: 500;
}

.section-header-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #cccccc;

  gap: 8px;
  font-weight: 500;
}

.webhook-icon {
  color: #f2711c;
  line-height: 1;
}

.section-title {
  font-weight: 600;
  white-space: nowrap;
}

.info-icon {
  color: #2196F3;
}

.section-description-inline {
  color: #cccccc;
  font-size: 14px;
}

/* Sample Model Item Styles */
.sample-model-item {
  display: flex;
  align-items: center;
  padding: 10px;
  cursor: pointer;
  border-bottom: 1px solid #7f8383;
  transition: background-color 0.2s;
  /* border-right: 6px solid #69605a;
  border-left: 6px solid #69605a; */
  /* border-radius: 15px; */

}

.sample-model-item:hover {
  background-color: #f0f0f0;
}

.sample-model-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 12px;
  object-fit: cover;
  border: 0.1px solid #7f8383;
}

.sample-model-info {
  display: flex;
  flex-direction: column;
}

.sample-model-name {
  font-weight: 600;
  color: #202124;
  /* Google-like dark text */
  font-size: 14px;
}

.sample-model-caption {
  font-size: 12px;
  color: #5f6368;
  /* Google-like secondary text */
}

#loadCustomModesContainer {
  background-color: #f9f9f9;
  border: 0.2px solid #7f8383;
  border-bottom: none;
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.5);
}

#SampleModelsContainerLabel {
  background-color: #f9f9f9;
  overflow: auto;
  border-right: 0.2px solid #7f8383;
  border-left: 0.2px solid #7f8383;
  border-bottom: 0.2px solid #7f8383;
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.5);
  border-top: 0.2px solid #7f8383;
}

#loadSampleModelsContainer {
  background-color: #f9f9f9;
  overflow: auto;
  border: 0.2px solid #7f8383;
  border-top: none;
  border-bottom-left-radius: 15px;
  border-bottom-right-radius: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

#loadModelsMainContainer {
  display: none;
  position: absolute;
  background-color: #f9f9f9;
  height: 10em;
  width: 19em;
  position: absolute;
  float: left;
  margin-top: 7px;
  margin-left: 12px;
}

/* Modal internal padding */
#loadModelDiv > div:nth-child(2) {
  padding: 20px;
}

/* 4 columns that FIT inside small modal */
.model-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-top: 20px;
}

/* Each card */
.sampleimagediv {
  text-align: center;
}

/* Smaller images to fit small modal */
.sampleimage,
#uploadIcon {
  width: 110px;
  height: 110px;
  object-fit: contain;
  background-color: #e6f0f5;
  padding: 8px;
  border-radius: 6px;
}

/* Caption styling */
.caption {
  margin-top: 6px;
  font-size: 12px;
  min-height: 32px;
}

#uploadModelButton,
#uploadModelButtonWithMeasurement {
  width: 13em !important;
  /* Matches the width of other main buttons if desired, or just consistent */
}
  .quick-setting-item {
    display: flex;
    align-items: center;
    gap: 8px; /* Adjust spacing between checkbox and text */
  }

  .quick-setting-item input[type="checkbox"] {
    margin: 0;
  }