<template>
  <div class="pt-popup">
    <pdf-print is-popup />
  </div>
</template>

<script>
import PdfPrint from '@/vue/components/Pdf/Print.vue';

export default {
  name: 'PrinterPDF',
  components: {
    'pdf-print': PdfPrint,
  },
};
</script>

<style lang="scss" scoped>
@import '@/vue/styles/tokens.scss';

.pt-popup {
  background: $c-surface-soft;

  :deep(.pt-print__card) {
    box-shadow: $shadow-card;
  }

  :deep(.pt-print__template-list) {
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
  }

  :deep(.pt-print__template-btn) {
    font-size: 12px;

    i {
      font-size: 12px;
      margin-right: 4px;
    }

    &.ivu-btn {
      height: 28px;
      line-height: 28px;
      padding: 0 10px;
      font-size: 12px;
      border-radius: $radius-badge;
    }
  }

  :deep(.pt-print__section) {
    padding: 10px;
  }

  :deep(.pt-print__section-header) {
    margin-bottom: 6px;
  }

  :deep(.pt-print__section-title) {
    font-size: 12px;
  }

  :deep(.pt-print__options) {
    gap: 8px;
    margin-bottom: 6px;
  }

  :deep(.ivu-checkbox-wrapper) {
    font-size: 12px;
  }

  :deep(.pt-print__option-label) {
    font-size: 12px;
  }

  :deep(.pt-print__field-label) {
    font-size: 11px;
    margin-bottom: 4px;
  }

  :deep(.ivu-input),
  :deep(.ivu-select-selection),
  :deep(.ivu-input-number),
  :deep(.ivu-input-number-input) {
    height: 30px;
    min-height: 30px;
    font-size: 12px;
    border-radius: $radius-badge;
  }

  :deep(.ivu-input) {
    padding: 0 8px;
  }

  :deep(.ivu-select-selection) {
    padding: 0 8px;
  }

  :deep(.ivu-select-selection .ivu-select-selected-value) {
    line-height: 30px;
    height: 30px;
    font-size: 12px;
  }

  :deep(.ivu-input-number) {
    width: 100%;
  }

  :deep(.ivu-input-number-input) {
    height: 28px;
    line-height: 28px;
    font-size: 12px;
  }

  :deep(.pt-print__upload-content) {
    padding: 24px 12px;
  }

  :deep(.pt-print__upload-icon) {
    transform: scale(0.9);
  }

  :deep(.pt-print__upload-text) {
    font-size: 14px;
  }

  :deep(.pt-print__upload-hint) {
    font-size: 11px;
  }

  :deep(.pt-print__template-footer) {
    padding-top: 12px;
  }

  :deep(.pt-print__template-link) {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .pt-popup {
    :deep(.pt-print__template-list) {
      grid-template-columns: 1fr;
    }

    :deep(.pt-print__fields) {
      .ivu-col {
        margin-bottom: 8px;
      }
    }
  }
}
</style>
