.pisell-block-time-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 8px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.18s ease;

  &.is-visible {
    opacity: 1;
  }

  &.is-dark {
    color: #ffffff;
  }

  &.is-light {
    color: #0f172a;
  }
}

.pisell-block-time-modal__panel {
  width: 100%;
  max-width: 720px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 16px;
  border: 1px solid #3f3f46;
  border-radius: 24px 24px 0 0;
  background: #121217;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.42);
  transform: translateY(8px) scale(0.98);
  opacity: 0;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.pisell-block-time-modal.is-visible .pisell-block-time-modal__panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.pisell-block-time-modal.is-light .pisell-block-time-modal__panel {
  border-color: #dbe2ea;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.16);
}

.pisell-block-time-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.pisell-block-time-modal__title {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
}

.pisell-block-time-modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid #3f3f46;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: #d4d4d8;
  transition: background 0.16s ease, border-color 0.16s ease;

  &:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
  }
}

.pisell-block-time-modal__close-icon {
  font-size: 20px;
  line-height: 1;
}

.pisell-block-time-modal.is-light .pisell-block-time-modal__close {
  border-color: #cbd5e1;
  background: #ffffff;
  color: #334155;

  &:hover:not(:disabled) {
    background: #f8fafc;
  }
}

.pisell-block-time-modal__body {
  padding: 16px;
  border: 1px solid #3f3f46;
  border-radius: 20px;
  background: #171820;
}

.pisell-block-time-modal.is-light .pisell-block-time-modal__body {
  border-color: #dbe2ea;
  background: #f8fafc;
}

.pisell-block-time-modal__field + .pisell-block-time-modal__field {
  margin-top: 16px;
}

.pisell-block-time-modal__label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.5;
  color: #a1a1aa;
}

.pisell-block-time-modal.is-light .pisell-block-time-modal__label {
  color: #64748b;
}

.pisell-block-time-modal__control {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #3f3f46;
  border-radius: 16px;
  outline: none;
  background: #111218;
  color: #ffffff;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;

  &:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18);
  }

  &:disabled {
    cursor: not-allowed;
    opacity: 0.7;
  }
}

.pisell-block-time-modal.is-light .pisell-block-time-modal__control {
  border-color: #cbd5e1;
  background: #ffffff;
  color: #0f172a;
}

.pisell-block-time-modal__error {
  margin-top: 16px;
  padding: 12px 16px;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 16px;
  background: rgba(239, 68, 68, 0.1);
  color: #fecaca;
  font-size: 14px;
  line-height: 1.5;
}

.pisell-block-time-modal.is-light .pisell-block-time-modal__error {
  background: #fef2f2;
  color: #b91c1c;
}

.pisell-block-time-modal__footer {
  display: flex;
  flex-direction: column-reverse;
  gap: 12px;
  align-items: stretch;
  justify-content: flex-end;
  margin-top: 24px;
}

.pisell-block-time-modal__ghost-button,
.pisell-block-time-modal__primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  transition: all 0.16s ease;
}

.pisell-block-time-modal__ghost-button {
  border: 1px solid #3f3f46;
  background: rgba(255, 255, 255, 0.05);
  color: #d4d4d8;

  &:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
  }
}

.pisell-block-time-modal.is-light .pisell-block-time-modal__ghost-button {
  border-color: #cbd5e1;
  background: #ffffff;
  color: #334155;

  &:hover:not(:disabled) {
    background: #f8fafc;
  }
}

.pisell-block-time-modal__primary-button {
  border: none;
  background: #7c3aed;
  color: #ffffff;

  &:hover:not(:disabled) {
    background: #8b5cf6;
  }

  &:disabled {
    cursor: not-allowed;
    opacity: 0.5;
  }
}

.pisell-block-time-modal__range {
  width: 100%;
}

.pisell-block-time-modal__body {
  .pisell-lowcode-picker,
  .pisell-lowcode-picker-range {
    width: 100%;
  }
}

@media (min-width: 768px) {
  .pisell-block-time-modal {
    align-items: center;
    padding: 16px;
  }

  .pisell-block-time-modal__panel {
    padding: 24px;
    border-radius: 24px;
  }

  .pisell-block-time-modal__footer {
    flex-direction: row;
    align-items: center;
  }

  .pisell-block-time-modal__ghost-button,
  .pisell-block-time-modal__primary-button {
    width: auto;
  }
}
