@use '../utils' as *;

/*----------------------------------------*/
/*  Table css
/*----------------------------------------*/
.table-container {
    background: var(--td-black-alt);
    padding: 25px 30px 10px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
    justify-content: flex-start;
    position: relative;
    box-shadow: -6px 6px 25px 0px rgba(101, 84, 255, 0.3);
    @include border-radius(30px);
    border: 1px solid var(--td-pale-cornflower-blue);
    @media #{$xs} {
        padding: 25px 20px 10px;
    }
}

// common table
.table-heading {
    .title {
        color: var(--td-pale-cornflower-blue);
        font-size: 20px;
        font-weight: 700;
        position: relative;
        padding-bottom: 12px;

        &:before {
            position: absolute;
            content: "";
            height: 1px;
            width: 63%;
            background: linear-gradient(95.42deg, rgb(108, 115, 255) 0%, rgb(56, 64, 247) 100%);
            bottom: 0px;
        }
    }
}

.td-table {
    width: 100%;
    border-collapse: separate; // Allows border-radius to work
    border-spacing: 0; // Removes spacing between table cells
    font-size: 14px;


    thead {
        background: rgba(94, 111, 253, 0.2);
        border-top: 1px solid rgba(94, 111, 253, 0.3);
        border-bottom: 1px solid rgba(94, 111, 253, 0.3);
        @include border-radius(8px);
        overflow: hidden; // Ensures border-radius applies in Firefox

        tr {
            th {
                border: 1px solid rgba(94, 111, 253, 0.3);
                border-inline-start: 0;
                border-inline-end: 0;
                padding: 10px 16px;
                text-align: left;
                font-weight: 600;
                color: var(--td-white);
            }
        }
    }

    th {
        text-align: left;
        padding: 14px 16px;
        border-bottom: 1px solid var(--td-border-primary);
        font-weight: 600;
        color: #4a4a4a;
    }

    td {
        text-align: left;
        padding: 14px 0px;
        border-bottom: 1px solid var(--td-border-primary);
        border-image: linear-gradient(90deg, rgba(91, 252, 196, 0.3) 0%, rgba(245, 147, 228, 0.3) 50%, rgba(113, 164, 240, 0.3) 100%);
        border-image-slice: 1;
    }

    tr {
        td {
            &:last-child {
                text-align: end;
            }
        }
    }

    .description {
        display: flex;
        align-items: center;
        gap: 12px;

        .subject-title {
            font-size: 14px;
            font-weight: 600;
            margin-bottom: 5px;
            color: rgba($white, $alpha: 0.7);
        }

        .date {
            font-size: 13px;
            font-weight: 500;
            color: rgba($white, $alpha: 0.6);
        }
    }

    .view-button {
        @include inline-flex();
        align-items: center;
        gap: 6px;

        i {
            font-size: 16px;
            color: var(--td-azure);
        }

        &:hover i {
            color: #0056b3;
        }
    }
}