﻿/*the stylesheet is loaded on the pages of the plugin only, and every rule is scoped to them
  so that it also behaves on whichever theme is active*/

.find-withdraw-request-page .tooltip,
.withdraw-request-page .tooltip {
  display: block;
  padding-block: 25px;
  border-bottom: none;
  text-align: center;
}

  .withdraw-request-page .tooltip.withdraw-request-deadline {
    max-width: 500px;
    margin: 0 auto 25px;
    border: 1px solid #ddd;
    padding-inline: 20px;
  }

/* labels above the inputs, centered */

.find-withdraw-request-page .inputs,
.withdraw-request-page .inputs {
  text-align: center;
}

  .find-withdraw-request-page .inputs label,
  .withdraw-request-page .inputs label {
    display: block;
    width: auto;
    margin: 0 0 6px;
    text-align: center;
  }

  .find-withdraw-request-page .inputs input[type="text"],
  .withdraw-request-page .inputs select,
  .withdraw-request-page .inputs textarea {
    width: 100%;
    max-width: 314px;
    box-sizing: border-box;
  }

.find-withdraw-request-page .message-error,
.withdraw-request-page .message-error {
  text-align: center;
}

.find-withdraw-request-page .buttons {
  text-align: center;
}

/* products */

.withdraw-request-page .data-table td.picture {
  text-align: center;
}

  .withdraw-request-page .data-table td.picture img {
    display: block;
    max-width: 80px;
    height: auto;
    margin: 0 auto;
  }

.withdraw-request-page .data-table td.unit-price {
  white-space: nowrap;
}

.withdraw-request-page .buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
}

  .withdraw-request-page .buttons .find-order-button {
    text-decoration: underline;
  }

/* small screens: every product becomes a card */

@media screen and (max-width: 768px) {
  .withdraw-request-page .table-wrapper {
    overflow: visible;
  }

  .withdraw-request-page .data-table,
  .withdraw-request-page .data-table tbody,
  .withdraw-request-page .data-table tr,
  .withdraw-request-page .data-table td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  .withdraw-request-page .data-table {
    background: none;
    padding-bottom: 0;
  }

    /*kept for screen readers, the labels of the cells say the same to everyone else*/
    .withdraw-request-page .data-table thead {
      position: absolute;
      width: 1px;
      height: 1px;
      overflow: hidden;
      clip: rect(0 0 0 0);
      white-space: nowrap;
    }

    .withdraw-request-page .data-table tr {
      margin-bottom: 15px;
      border: 1px dotted #ccc;
      background: #fff;
    }

    .withdraw-request-page .data-table td {
      border: none;
      padding: 8px 12px;
      text-align: center;
    }

      .withdraw-request-page .data-table td.picture {
        padding-top: 12px;
      }

        .withdraw-request-page .data-table td.picture img {
          max-width: 120px;
        }

      .withdraw-request-page .data-table td.unit-price,
      .withdraw-request-page .data-table td.quantity {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        border-top: 1px dotted #ccc;
        text-align: right;
        white-space: normal;
      }

        .withdraw-request-page .data-table td.unit-price:before,
        .withdraw-request-page .data-table td.quantity:before {
          content: attr(data-label);
          font-weight: bold;
          text-align: left;
        }

      .withdraw-request-page .data-table td.quantity select {
        min-width: 70px;
      }
}
