﻿/* assets/css/spedizioni.css */
.spedizioni-table tbody tr {
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.spedizioni-table td {
    vertical-align: top;
    overflow-wrap: anywhere;
}

.spedizioni-row.is-focus {
    background-color: #202a4a;
    outline: 2px solid rgba(83, 97, 192, 0.6);
}

.spedizioni-row.is-focus .btn {
    box-shadow: 0 0 0 2px rgba(83, 97, 192, 0.35);
}

.spedizioni-details {
    display: block;
}

.spedizioni-details > summary {
    cursor: pointer;
    width: fit-content;
}

.spedizioni-panel {
    margin-top: 12px;
    padding: 16px;
    display: grid;
    gap: 12px;
    background-color: rgba(20, 28, 46, 0.85);
    border-radius: 12px;
    min-width: 260px;
}

.spedizioni-form {
    display: grid;
    gap: 10px;
}

.spedizioni-form label {
    display: grid;
    gap: 6px;
    color: #d8def2;
    font-size: 0.9rem;
}

.spedizioni-form input[type="url"],
.spedizioni-form input[type="file"] {
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #2f3552;
    background-color: rgba(17, 22, 40, 0.9);
    color: #f5f7ff;
}

.spedizioni-form input[type="url"]:focus,
.spedizioni-form input[type="file"]:focus {
    border-color: #5361c0;
    outline: none;
    box-shadow: 0 0 0 2px rgba(83, 97, 192, 0.35);
}

.spedizioni-flash {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 18px;
    font-weight: 500;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.spedizioni-flash .material-symbols-rounded {
    font-size: 22px;
}

.spedizioni-flash--success {
    background-color: rgba(33, 196, 130, 0.16);
    color: #48d3a0;
}

.spedizioni-flash--error {
    background-color: rgba(236, 98, 117, 0.16);
    color: #ff8a9c;
}

.spedizioni-flash.is-fading {
    opacity: 0;
    transform: translateY(-4px);
}

@media (max-width: 820px) {
    .spedizioni-panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .spedizioni-table {
        display: block;
        width: 100%;
    }

    .spedizioni-table thead {
        display: none;
    }

    .spedizioni-table tbody {
        display: grid;
        gap: 12px;
    }

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

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

    .spedizioni-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;
    }

    .spedizioni-table .empty-state::before {
        content: none;
    }

    .spedizioni-table .empty-state {
        text-align: center;
        padding: 12px;
    }

    .spedizioni-details {
        width: 100%;
    }

    .spedizioni-details > summary {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .spedizioni-panel {
        min-width: 0;
        width: 100%;
    }

    .spedizioni-panel .btn {
        width: 100%;
        justify-content: center;
    }
}
