@use '../../assets/styles/fonts';

.ff-drawer-container {
  .ff-overlay {
    position: fixed;
    inset: 0;
    background-color: var(--drawer-title-color);
    opacity: 0.5;
    transition: all 0.4s ease-in-out;
  }

  .ff-drawer {
    margin-bottom: 4px;
    position: fixed;
    right: 5px;
    bottom: 0;
    top: 87px;
    background-color: var(--primary-button-text-color);
    transform: translateX(100%);
    opacity: 0;

    &--open {
      transform: translateX(0);
      opacity: 1;
    }
    &--small {
      width: 442px;
    }
    &--medium {
      width: 664px;
    }
    &--large {
      width: 886px;
    }
    &--x-large {
      width: calc(100vw - 10px);
    }
    &--open,
    &--medium,
    &--large,
    &--x-large {
      transition: all 0.4s ease-in-out;
      border-radius: 5px;
      border: 1px solid var(--table-header-color-primary);
    }

    .ff-drawer-header {
      padding: 0px 4px;
      display: flex;
      gap: 10px;
      border-bottom: 1px solid var(--table-header-color-primary);

      .ff-drawer-title {
        @extend .fontSm;
        font-weight: 600;
        color: var(--drawer-title-color);
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
      }
      .ff-close-icon {
        border-radius: 4px;
        display: flex;
        align-items: center;
        justify-content: center;
      }

      .ff-drawer-action-section {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        height: 32px;

        .ff-action-button {
          display: flex;
          align-items: center;
          gap: 5px;

          .ff-expand-collapse-button {
            cursor: pointer;
            background-color: var(--button-bg-color);
            outline: none;
            border: none;
            margin: 0;
            border: 1px solid transparent;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 8px;
          }
          .ff-custom-header {
            background-color: var(--drawer-footer-bg);
            width: 100%;
          }
        }
      }
      .ff-custom-header {
        width: 100%;
        padding: 0;
      }
    }

    .ff-drawer-body {
      background-color: var(--drawer-footer-bg);
    }
    .ff-drawer-body-with-scroll {
      background-color: var(--drawer-footer-bg);
      overflow-y: auto;
    }

    .ff-drawer-footer {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      padding: 4px 8px 4px 8px;
      display: flex;
      justify-content: space-between;
      border-top: 1px solid var(--drawer-footer-border);
      background-color: var(--base-bg-color);
      transform: translateY(3px);
      border-radius: 0 0 4px 4px;

      .button-container {
        display: flex;
        justify-content: flex-end;
        gap: 8px;
      }
      .ff-custom-footer {
        padding: 0;
        background-color: var(--drawer-footer-bg);
        width: 100%;
        border-radius: 0 0 8px 8px;
      }
    }
  }
}
