﻿/* assets/css/ordini.css */
.ordini-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.ordini-toolbar__form {
    flex: 1 1 320px;
}

.ordini-toolbar__reset {
    white-space: nowrap;
}

.ordini-detail-actions {
    margin-top: 16px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.ordini-table td,
.ordini-lines-table td {
    vertical-align: top;
    overflow-wrap: anywhere;
}

@media (max-width: 760px) {
    .ordini-toolbar {
        align-items: stretch;
    }

    .ordini-toolbar__form {
        width: 100%;
    }
}

@media (max-width: 560px) {
    .ordini-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .ordini-toolbar__reset {
        width: 100%;
        justify-content: center;
    }

    .ordini-toolbar__form .btn {
        width: 100%;
        justify-content: center;
    }

    .ordini-detail-actions {
        flex-direction: column;
    }

    .ordini-detail-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .ordini-table,
    .ordini-lines-table {
        display: block;
        width: 100%;
    }

    .ordini-table thead,
    .ordini-lines-table thead {
        display: none;
    }

    .ordini-table tbody,
    .ordini-lines-table tbody {
        display: grid;
        gap: 12px;
    }

    .ordini-table tbody tr,
    .ordini-lines-table tbody tr {
        display: grid;
        gap: 10px;
        padding: 16px;
        background: rgba(255, 255, 255, 0.04);
        border-radius: 12px;
    }

    .ordini-table tbody tr td,
    .ordini-lines-table tbody tr td {
        border-bottom: none;
        padding: 0;
        display: grid;
        gap: 4px;
    }

    .ordini-table tbody tr td::before,
    .ordini-lines-table tbody tr td::before {
        content: attr(data-label);
        font-size: 0.75rem;
        font-weight: 600;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: #9aa0b6;
    }

    .ordini-table .empty-state::before,
    .ordini-lines-table .empty-state::before {
        content: none;
    }

    .ordini-table .empty-state,
    .ordini-lines-table .empty-state {
        text-align: center;
        padding: 12px;
    }

    .ordini-table td .btn {
        width: 100%;
        justify-content: center;
    }

    .ordini-lines-table tfoot {
        display: block;
    }

    .ordini-lines-table tfoot tr {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 16px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .ordini-lines-table tfoot th {
        padding: 0;
        border: none;
    }
}
