import styled from 'styled-components';

// Styled components
export const NotesStyledTableWrapper = styled.div`
  overflow-x: auto;
  max-height: calc(100vh - 396px);
  scrollbar-width: none;
  /* box-shadow: 0px 0px 30px 6px rgba(46, 45, 116, 0.05); */
  &::-webkit-scrollbar {
    width: 5px;
    border-radius: 100px;
    height: 5px;
  }

  &::-webkit-scrollbar-track {
    background: #777;
    border-radius: 100px;
  }

  &::-webkit-scrollbar-thumb {
    background: #7b61ff;
    border-radius: 100px;
  }

  &::-webkit-scrollbar-thumb:hover {
    background: #7b61ff;
  }
`;

export const NotesStyledTable = styled.table`
  border-spacing: 0 10px;
  width: 100%;
  /* min-width: 1600px; */
  thead {
    white-space: nowrap;
    tr {
      border-radius: 40px;
      border-spacing: 0 10px;
      .emailInvoiceCheckbox {
        padding-right: 0px;
        width: 0;
        > div {
          width: fit-content;
        }
      }
      .emailInvoiceNo {
        padding-left: 0px;
      }
      .emailInvoiceShare {
        width: 100px;
      }
      th {
        color: #3a3630;
        font-size: 14px;
        font-style: normal;
        font-weight: 600;
        line-height: normal;
        padding: 11px 15px;
        background: #f0f2f2;
        border-right: none;
        border-left: none;
        text-align: left;
        border: 1px solid rgba(0, 0, 0, 0.08);
        border-width: 1px 0;
        &:first-child {
          border-radius: 100px 0 0 100px;
          border-left: 1px solid rgba(0, 0, 0, 0.08);
        }
        &:last-child {
          border-radius: 0px 100px 100px 0;
          border-right: 1px solid rgba(0, 0, 0, 0.08);
        }
      }
    }
  }
  tbody {
    tr {
      td {
        color: #3a3630;
        font-size: 13px;
        font-style: normal;
        font-weight: 400;
        line-height: normal;
        padding: 12px 15px;
        background: #fff;
        border: 1px solid rgba(0, 0, 0, 0.08);
        border-right: none;
        border-left: none;
        .actionbox {
          display: flex;
          gap: 5px;
        }
        .shareIconContainer {
          display: flex;
          padding: 2px 12px;
          align-items: center;
          gap: 8px;
          border-radius: 20px;
          border: 1px solid var(--tonal-brown-101, #e2e0db);
          background: #fff;
          list-style-type: none;
          /* padding-left: 0; */
          /* fontWeight: 600,
          paddingLeft: 0, */
          cursor: pointer;
        }
        .statustext {
          color: #1f9254;
          font-family: 'Open Sans';
          font-size: 12px;
          font-style: normal;
          font-weight: 600;
          line-height: normal;
        }
        .downloadcontainer {
          display: flex;
          padding: 2px 12px;
          align-items: center;

          width: 28px;
          height: 28px;
          flex-direction: column;

          border-radius: 14px;
          border: 1px solid #e2e0db;
          background: #fff;
        }
        .statuscontainer {
          display: flex;
          padding: 5px 30px 5px 30px;
          justify-content: center;
          align-items: center;
          gap: 5px;
          flex: 1 0 0;
          border-radius: 22px;
          background: rgba(41, 204, 106, 0.15);
        }
      }
      &:nth-child(even) td {
        background: #f6fbff;
      }
      td:first-child {
        border-radius: 100px 0 0 100px;
        border-left: 1px solid rgba(0, 0, 0, 0.08);
      }
      td:last-child {
        border-radius: 0px 100px 100px 0;
        border-right: 1px solid rgba(0, 0, 0, 0.08);
      }
      .flex {
        display: flex;
        flex-direction: row;
        gap: 5px;
        height: 29px;
        align-items: center;
      }

      &.insideTable {
        td {
          border-radius: 0;
          border: none;
          &:last-child {
            border-radius: 0;
            border-right: none;
          }
        }
        table {
          border-spacing: 0;
          width: 100%;
          border-radius: 5px;
          border: 1px solid rgba(0, 0, 0, 0.08);
          overflow: hidden;
          border-top-left-radius: 15px;
          border-top-right-radius: 15px;
          thead {
            tr {
              border-bottom: none;
              th {
                padding: 14px 20px;
                text-align: left;
                border-top: 0;
                border-right: 0;
                border-left: 0;
                background: #f8fafc;

                &:first-child {
                  border-radius: 0;
                  border-left: 1px solid rgba(0, 0, 0, 0.08);
                  border-top-left-radius: 15px;
                }
                &:last-child {
                  border-radius: 0;
                }
              }
            }
          }
          tbody {
            tr {
              td {
                padding: 14px 20px;
                text-align: left;
                border-bottom: 1px solid rgba(58, 54, 48, 0.15);
                background: #fff;
                > svg {
                  transform: scale(1.5);
                  background-color: #edebe8;
                  border-radius: 20px;
                  padding: 5px;
                }
                &:last-child {
                  border-radius: 0;
                  border-right: none;
                }
              }
            }
          }
        }
      }
    }
  }
  .actions {
    display: flex;
    align-items: center;
    gap: 20px;
    > svg {
      transform: scale(1.5);
      background-color: #edebe8;
      border-radius: 20px;
      padding: 5px;
    }

    .close-icon {
      transform: scale(1.3);
      background-color: transparent;
      border-radius: 0;
      padding: 0;
    }
  }
`;
