// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
//
// Copyright (c) KALEIDOS INC Sucursal en España SL

@use "refactor/common-refactor.scss" as deprecated;

.share-modal {
  display: block;
  position: absolute;
  top: deprecated.$s-52;
  right: deprecated.$s-12;
  left: calc(100vw - deprecated.$s-512);
  z-index: deprecated.$z-index-modal;
}

.share-link-dialog {
  @extend %modal-container-base;

  min-height: unset;
}

.share-link-header {
  margin-bottom: deprecated.$s-24;
}

.share-link-title {
  @include deprecated.uppercase-title-typography;

  color: var(--modal-title-foreground-color);
}

.modal-close-button {
  @extend %modal-close-btn-base;
}

.modal-content {
  @include deprecated.body-small-typography;
  @include deprecated.flex-column;

  gap: deprecated.$s-24;
}

.share-link-section {
  @include deprecated.flex-column;

  gap: deprecated.$s-8;
}

.hint-wrapper {
  @include deprecated.flex-row;
}

.hint {
  flex-grow: 1;
  color: var(--modal-text-foreground-color);
}

.custon-input-wrapper {
  @include deprecated.flex-row;

  border-radius: deprecated.$br-8;
  height: deprecated.$s-32;
  width: 100%;
  background-color: var(--input-background-color);
}

.input-text {
  @extend %input-element;
  @include deprecated.body-small-typography;

  color: var(--input-foreground-color-active);
  padding-left: deprecated.$s-8;
  margin: 0;
  flex-grow: 1;

  &:focus {
    outline: none;
    border: deprecated.$s-1 solid var(--input-border-color-active);
  }
}

.copy-button {
  @extend %button-secondary;
  @include deprecated.flex-row;

  gap: deprecated.$s-8;
  height: deprecated.$s-32;
  width: deprecated.$s-28;

  svg {
    @extend %button-icon;

    stroke: var(--icon-foreground-hover);
  }
}

.description {
  @include deprecated.body-small-typography;

  color: var(--modal-text-foreground-color);
  margin-bottom: deprecated.$s-24;
}

.actions {
  @include deprecated.flex-row;

  justify-content: flex-end;
}

.button-active {
  @extend %modal-accept-btn;
}

.button-cancel {
  @extend %modal-cancel-btn;
}

.button-danger {
  @extend %modal-danger-btn;
}

.permissions-section {
  @include deprecated.flex-column;

  gap: deprecated.$s-8;
}

.manage-permissions {
  @include deprecated.button-style;
  @include deprecated.uppercase-title-typography;

  color: var(--menu-foreground-color-rest);
  height: deprecated.$s-32;
  display: flex;
  align-items: center;
  padding: 0;
}

.icon {
  @include deprecated.flex-center;

  margin-right: deprecated.$s-6;

  svg {
    @extend %button-icon;

    stroke: var(--icon-foreground);
  }

  &.rotated {
    transform: rotate(90deg);
  }
}

.view-mode,
.access-mode,
.inspect-mode {
  display: flex;
  width: 100%;
}

.view-mode {
  max-height: deprecated.$s-216;
  overflow: hidden auto;
  scrollbar-gutter: stable;
}

.subtitle {
  color: var(--modal-text-foreground-color);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: deprecated.$s-136;
  height: deprecated.$s-32;
}

.items {
  flex-grow: 1;
  color: var(--input-foreground-color-active);
}

.select-all-row {
  @include deprecated.flex-row;

  justify-content: space-between;
  height: deprecated.$s-32;
  border-bottom: deprecated.$s-1 solid var(--input-border-color-disabled);
}

.select-all-label {
  color: var(--input-foreground-color-active);
}

.pages-selection {
  margin: 0;

  li {
    border-bottom: deprecated.$s-1 solid var(--input-border-color-disabled);
  }

  li:last-child {
    border-bottom: none;
  }
}

.count-pages,
.current-tag {
  @include deprecated.body-small-typography;

  color: var(--input-foreground-color);
}

.checkbox-wrapper {
  @extend %input-checkbox;

  height: deprecated.$s-32;
  padding: 0;

  span.checked {
    background-color: var(--input-checkbox-background-color-active);
    border: deprecated.$s-1 solid var(--input-checkbox-background-color-active);

    svg {
      @extend %button-icon-small;

      stroke: var(--input-checkbox-foreground-color-active);
    }
  }
}
