/* Wilayah + shared native selects: chevron inset from the right edge. */
.nemu-select-wrap {
  position: relative;
  width: 100%;
}

.nemu-select-wrap .nemu-field__input,
.nemu-select-wrap .nemu-select,
.nemu-select-wrap .create-table-wilayah__select {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 44px 12px 14px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: none;
  cursor: pointer;
}

.nemu-select-wrap .nemu-select-chevron {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  color: var(--nemu-on-surface, inherit);
}

.nemu-select-wrap select:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

/* Date/time: native input fills the card (whole row opens picker). */
.create-table-datetime__field-wrap {
  flex: 1 1 200px;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.create-table-datetime__face {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 14px 4px 12px;
  min-height: 48px;
  border-radius: 10px;
  border: 1px solid var(--nemu-outline, #79747e);
  background-color: var(--nemu-surface-container, #2b2930);
  cursor: pointer;
}

.create-table-datetime__icon {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
  pointer-events: none;
  user-select: none;
}

.create-table-datetime__input {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  margin: 0;
  padding: 8px 4px;
  border: none;
  background: transparent;
  color: var(--nemu-on-surface, inherit);
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  width: 100%;
}

.create-table-datetime__input:focus {
  outline: none;
}

/* Native calendar/clock affordance (right side). */
.create-table-datetime__input::-webkit-calendar-picker-indicator {
  cursor: pointer;
  width: 1.35rem;
  height: 1.35rem;
  margin-left: 6px;
  padding: 2px;
  opacity: 0.7;
}

html[data-theme='light'] .create-table-datetime__input {
  color-scheme: light;
}

/* Dark UI: replace native dark icons with light SVG (still opens native picker). */
html[data-theme='dark'] .create-table-datetime__input[type='date']::-webkit-calendar-picker-indicator {
  opacity: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23F4F4F5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px 18px;
}

html[data-theme='dark'] .create-table-datetime__input[type='time']::-webkit-calendar-picker-indicator {
  opacity: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23F4F4F5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpolyline points='12 7 12 12 15 14'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px 18px;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme='light']) .create-table-datetime__input[type='date']::-webkit-calendar-picker-indicator {
    opacity: 1;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23F4F4F5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 18px 18px;
  }

  html:not([data-theme='light']) .create-table-datetime__input[type='time']::-webkit-calendar-picker-indicator {
    opacity: 1;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23F4F4F5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpolyline points='12 7 12 12 15 14'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 18px 18px;
  }
}

html[data-theme='dark'] .create-table-datetime__input[type='date'],
html[data-theme='dark'] .create-table-datetime__input[type='time'] {
  accent-color: var(--nemu-primary, #7c3aed);
}

/* Vibe chip: check badge */
.create-table-vibes__chip--selected .create-table-vibes__chip-check {
  background-color: rgba(255, 255, 255, 0.22);
}
