/*
|--------------------------------------------------------------------------
| JOELSTORE - TABLES CSS
|--------------------------------------------------------------------------
*/

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;

    background: #202124;
    border: 1px solid #303134;
    border-radius: 14px;
}

.data-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    border-spacing: 0;
}

.data-table thead {
    background: #292a2c;
}

.data-table th {
    padding: 13px 15px;

    color: #999b9f;

    font-size: 10px;
    font-weight: 800;

    text-align: left;
    text-transform: uppercase;
    letter-spacing: .4px;

    white-space: nowrap;

    border-bottom: 1px solid #38393c;
}

.data-table td {
    padding: 14px 15px;

    color: #d7d8da;

    font-size: 12px;

    border-bottom: 1px solid #2d2e30;

    vertical-align: middle;
}

.data-table tbody tr {
    transition: background .15s ease;
}

.data-table tbody tr:hover {
    background: #27282a;
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}


/* ==========================================================================
   TABLE PRODUCT
========================================================================== */

.table-product {
    display: flex;
    align-items: center;

    gap: 10px;

    min-width: 180px;
}

.table-product-image {
    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    background: #303134;
    border-radius: 8px;

    color: #fff;
    font-size: 17px;

    overflow: hidden;
}

.table-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.table-product-info {
    min-width: 0;
}

.table-product-info strong {
    display: block;

    max-width: 220px;

    overflow: hidden;

    color: #fff;

    font-size: 12px;

    white-space: nowrap;
    text-overflow: ellipsis;
}

.table-product-info small {
    display: block;

    margin-top: 3px;

    color: #7f8185;

    font-size: 10px;
}


/* ==========================================================================
   INVOICE
========================================================================== */

.invoice-code {
    display: inline-flex;
    align-items: center;

    padding: 5px 8px;

    background: #292a2c;

    border: 1px solid #38393b;
    border-radius: 6px;

    color: #ddd;

    font-family: monospace;
    font-size: 10px;
}


/* ==========================================================================
   STATUS
========================================================================== */

.table-status {
    display: inline-flex;
    align-items: center;

    min-width: 65px;

    justify-content: center;

    padding: 5px 8px;

    border-radius: 6px;

    background: #303134;

    color: #aaa;

    font-size: 9px;
    font-weight: 800;

    text-transform: uppercase;
}

.table-status.success,
.table-status.paid,
.table-status.completed {
    background: rgba(63,190,105,.12);
    color: #61e58b;
}

.table-status.pending,
.table-status.processing {
    background: rgba(255,190,65,.12);
    color: #ffc15a;
}

.table-status.failed,
.table-status.cancelled,
.table-status.expired {
    background: rgba(255,75,75,.12);
    color: #ff7474;
}


/* ==========================================================================
   PRICE
========================================================================== */

.table-price {
    color: #fff;

    font-size: 12px;
    font-weight: 800;

    white-space: nowrap;
}

.table-price.primary {
    color: #ff7415;
}


/* ==========================================================================
   TARGET
========================================================================== */

.table-target {
    display: inline-block;

    max-width: 150px;

    overflow: hidden;

    color: #bbb;

    font-family: monospace;
    font-size: 10px;

    white-space: nowrap;
    text-overflow: ellipsis;
}


/* ==========================================================================
   ACTIONS
========================================================================== */

.table-actions {
    display: flex;
    align-items: center;

    gap: 6px;

    white-space: nowrap;
}

.table-action {
    width: 30px;
    height: 30px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #38393c;
    border-radius: 7px;

    background: #292a2c;

    color: #bbb;

    text-decoration: none;

    font-size: 12px;

    cursor: pointer;

    transition:
        background .15s ease,
        border-color .15s ease,
        color .15s ease;
}

.table-action:hover {
    background: #333438;
    border-color: #ff7415;
    color: #ff7415;
}

.table-action.primary:hover {
    background: #ff7415;
    border-color: #ff7415;
    color: #fff;
}

.table-action.danger:hover {
    background: #d84747;
    border-color: #d84747;
    color: #fff;
}


/* ==========================================================================
   CHECKBOX
========================================================================== */

.table-checkbox {
    width: 15px;
    height: 15px;

    accent-color: #ff7415;

    cursor: pointer;
}


/* ==========================================================================
   TABLE TOOLBAR
========================================================================== */

.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;

    margin-bottom: 14px;
}

.table-toolbar-left,
.table-toolbar-right {
    display: flex;
    align-items: center;

    gap: 8px;
}

.table-search {
    width: 230px;

    padding: 9px 11px;

    background: #292a2c;

    border: 1px solid #38393b;
    border-radius: 8px;

    outline: none;

    color: #fff;

    font-size: 11px;
}

.table-search:focus {
    border-color: #ff7415;
}

.table-filter {
    min-height: 35px;

    padding: 0 10px;

    background: #292a2c;

    border: 1px solid #38393b;
    border-radius: 8px;

    color: #ccc;

    font-size: 11px;

    outline: none;

    cursor: pointer;
}

.table-filter:focus {
    border-color: #ff7415;
}


/* ==========================================================================
   TABLE FOOTER
========================================================================== */

.table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-top: 13px;

    color: #77797d;

    font-size: 10px;
}


/* ==========================================================================
   RESPONSIVE
========================================================================== */

@media (max-width: 700px) {

    .table-wrapper {
        border-radius: 10px;
    }

    .data-table {
        min-width: 680px;
    }

    .data-table th {
        padding: 11px 12px;
        font-size: 9px;
    }

    .data-table td {
        padding: 11px 12px;
        font-size: 11px;
    }

    .table-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .table-toolbar-left,
    .table-toolbar-right {
        width: 100%;
    }

    .table-search {
        width: 100%;
        box-sizing: border-box;
    }

    .table-filter {
        flex: 1;
    }

    .table-footer {
        align-items: flex-start;
        flex-direction: column;
    }

}