
.user-options {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 20px;

  background: rgba(0, 0, 0, 0.35);

  animation: user-options-fade-in 0.18s ease-out;
}

.user-options__content {
  width: 100%;
  max-width: 700px;
  padding: 0 8px;
  max-height: calc(100vh - 40px);

  overflow-y: scroll;

  background: #fff;
  border-radius: 8px;

  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);

  animation: user-options-dialog-in 0.22s ease-out;
}



.user-options__header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 16px 18px;

  border-bottom: 1px solid #eee;
}

.user-options__title {
  margin: 0;

  font-size: 18px;
  font-weight: 600;

  color: #222;
}

.user-options__close {
  width: 36px;
  height: 36px;

  padding: 0;

  border: 0;
  border-radius: 50%;

  background: transparent;
  color: #666;

  cursor: pointer;

  font-size: 32px;
  line-height: 1;
}

.user-options__close:hover {
  background: #f0f0f0;
  color: #222;
}



.user-options__body {
  padding: 18px;
}



.user-options__field {
  margin-bottom: 24px;
}

.user-options__label {
  display: block;

  margin-bottom: 7px;

  font-size: 14px;
  font-weight: 600;

  color: #333;
}



.user-options__dimensions {
  display: flex;

  gap: 24px;
}

.user-options__dimensions > .user-options__field {
  flex: 1;
  min-width: 0;
}



.user-options__input-row {
  display: flex;
  align-items: center;

  gap: 8px;
}

.user-options__input {
  width: 100%;
  min-width: 0;
  height: 36px;

  padding: 0 10px;

  border: 1px solid #ccc;
  border-radius: 5px;

  outline: none;

  background: #fff;
  color: #333;

  font-size: 14px;
}

.user-options__input:focus {
  border-color: #888;
}

.user-options__unit {
  flex: 0 0 auto;

  font-size: 14px;
  color: #666;
}



.user-options__description {
  margin-top: 6px;

  font-size: 12px;
  line-height: 1.5;

  color: #777;
}



.user-options__segment {
  display: flex;

  width: 100%;

  overflow: hidden;

  border: 1px solid #ccc;
  border-radius: 5px;
}

.user-options__segment-button {
  flex: 1;

  height: 36px;

  padding: 0 10px;

  border: 0;
  border-right: 1px solid #ccc;

  background: #fff;
  color: #444;

  cursor: pointer;

  font-size: 13px;
}

.user-options__segment-button:last-child {
  border-right: 0;
}

.user-options__segment-button:hover {
  background: #f5f5f5;
}

.user-options__segment-button.is-active {
  background: #333;
  color: #fff;
}



.user-options__fill-color {
  display: grid;
  grid-template-rows: 0fr;

  opacity: 0;
  overflow: hidden;

  transition: grid-template-rows 0.22s ease, opacity 0.18s ease;
}

.user-options__fill-color > .user-options__field {
  min-height: 0;
  overflow: hidden;

  margin-bottom: 0;
}

.user-options__fill-color.is-visible {
  grid-template-rows: 1fr;

  opacity: 1;
}

.user-options__fill-color.is-visible > .user-options__field {
  margin-bottom: 16px;
}



.user-options__color-options {
  display: flex;
  align-items: center;

  margin-left: 5px;

  gap: 10px;
}

.user-options__color-button {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 38px;
  height: 38px;

  padding: 0;

  border: 1px solid #ccc;
  border-radius: 50%;

  background: #fff;

  cursor: pointer;

  transition: border-color 0.15s ease, box-shadow 0.15s ease,
    background 0.15s ease;
}

.user-options__color-button:hover {
  background: #f5f5f5;
}

.user-options__color-button.is-active {
  border-color: #333;

  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #333;
}

.user-options__color-circle {
  display: block;

  width: 24px;
  height: 24px;

  border-radius: 50%;
}

.user-options__color-circle--white {
  background: #fff;

  border: 1px solid #ccc;
}

.user-options__color-circle--black {
  background: #000;
}

.user-options__color-circle--picker {
  width: 24px;
  height: 24px;

  border: 1px solid #ccc;
  border-radius: 4px;
}



.user-options__color-picker {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 38px;
  height: 38px;

  padding: 0;

  border: 1px solid #ccc;
  border-radius: 5px;

  background: #fff;

  cursor: pointer;

  transition: border-color 0.15s ease, box-shadow 0.15s ease,
    background 0.15s ease;
}

.user-options__color-picker:hover {
  background: #f5f5f5;
}

.user-options__color-picker.is-active {
  border-color: #333;

  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #333;
}

.user-options__color-picker input[type="color"] {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  padding: 0;
  border: 0;

  opacity: 0;

  cursor: pointer;
}



.user-options__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 14px 18px;

  border-top: 1px solid #eee;
}

.user-options__footer-actions {
  display: flex;
  align-items: center;

  gap: 8px;
}

.user-options__button {
  height: 36px;

  padding: 0 16px;

  border-radius: 5px;

  cursor: pointer;

  font-size: 14px;
}



.user-options__button--reset {
  border: 0;

  background: #eee;
  color: #666;
}

.user-options__button--reset:hover {
  background: #f5f5f5;
  color: #222;
}



.user-options__button--cancel {
  border: 1px solid #ccc;

  background: #fff;
  color: #333;
}

.user-options__button--cancel:hover {
  background: #f5f5f5;
}



.user-options__button--apply {
  border: 1px solid #333;

  background: #333;
  color: #fff;
}

.user-options__button--apply:hover {
  background: #222;
}



@keyframes user-options-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes user-options-dialog-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}



@keyframes user-options-fade-out {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes user-options-dialog-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  to {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}

.user-options.is-closing {
  animation: user-options-fade-out 0.16s ease-in forwards;
}

.user-options.is-closing .user-options__content {
  animation: user-options-dialog-out 0.16s ease-in forwards;
}



@media (max-width: 768px) {
  .user-options {
    align-items: flex-end;
    padding: 3px;
  }

  .user-options__content {
    max-width: none;
    max-height: 90vh;

    border-radius: 10px 10px 0 0;

    animation: user-options-mobile-in 0.22s ease-out;
  }

  .user-options.is-closing .user-options__content {
    animation: user-options-mobile-out 0.18s ease-in forwards;
  }

  .user-options__dimensions {
    flex-direction: column;

    gap: 0;
  }
}



@keyframes user-options-mobile-in {
  from {
    opacity: 0;
    transform: translateY(100%);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes user-options-mobile-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(100%);
  }
}



@media (prefers-reduced-motion: reduce) {
  .user-options,
  .user-options__content,
  .user-options__fill-color {
    animation: none !important;
    transition: none !important;
  }
}
 