/**
 * Admin Orders CSS
 * 
 * @package LivraisonAPI
 */

 .livraison-orders-wrap {
    margin: 20px 20px 0 0;
}

.livraison-orders-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 0;
}

.livraison-orders-stats {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.livraison-stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    text-decoration: none;
    color: #23282d;
    transition: all 0.2s;
}

.livraison-stat-item:hover {
    background: #f8f9fa;
    border-color: #007cba;
}

.livraison-stat-item.active {
    background: #007cba;
    border-color: #007cba;
    color: #fff;
}

.livraison-stat-count {
    font-weight: 700;
    font-size: 18px;
}

.livraison-stat-label {
    font-size: 13px;
    color: #666;
}

.livraison-stat-item.active .livraison-stat-label {
    color: rgba(255,255,255,0.8);
}

.livraison-orders-search form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.livraison-orders-search input[type="search"] {
    width: 250px;
    padding: 6px 12px;
}

.livraison-orders-table-wrap {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    overflow: hidden;
}

.livraison-orders-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.livraison-orders-table td {
    vertical-align: middle;
}

.livraison-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.livraison-code-secret {
    font-size: 11px;
    color: #6b7280;
}

.livraison-actions {
    display: flex;
    gap: 5px;
}

.livraison-actions .button {
    padding: 0 8px;
    line-height: 28px;
    min-height: 28px;
}

.livraison-actions .button .dashicons {
    font-size: 16px;
    line-height: 28px;
}

.livraison-pagination {
    margin-top: 20px;
    text-align: center;
}

.livraison-pagination .page-numbers {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 2px;
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    text-decoration: none;
    color: #23282d;
}

.livraison-pagination .page-numbers.current {
    background: #007cba;
    border-color: #007cba;
    color: #fff;
}

.livraison-pagination .page-numbers:hover:not(.current) {
    background: #f8f9fa;
}

.livraison-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
}

.livraison-empty-state .dashicons {
    font-size: 60px;
    width: 60px;
    height: 60px;
    color: #ccd0d4;
}

.livraison-empty-state h2 {
    margin: 20px 0 10px 0;
    color: #23282d;
}

.livraison-empty-state p {
    color: #666;
}

.livraison-text-muted {
    color: #999;
    font-style: italic;
}

.livraison-delivery-info {
    font-size: 13px;
    line-height: 1.6;
}

.livraison-delivery-info strong {
    color: #23282d;
}

.livraison-delivery-info small {
    display: block;
    color: #6b7280;
    margin-top: 2px;
}

.livraison-delivery-info .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    vertical-align: middle;
    margin-right: 3px;
}

.livraison-delivery-info .livraison-agency-phone {
    color: #3b82f6;
}

.livraison-delivery-info .livraison-agency-email {
    color: #6b7280;
}

/* Track Modal */
.livraison-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 100000;
}

.livraison-modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    z-index: 100001;
    overflow: hidden;
}

.livraison-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
}

.livraison-modal-header h3 {
    margin: 0;
}

.livraison-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0 8px;
}

.livraison-modal-close:hover {
    color: #23282d;
}

.livraison-modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(80vh - 80px);
}

.livraison-loading {
    text-align: center;
    padding: 30px;
    color: #666;
}

/* Track status */
.livraison-track-status {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.livraison-track-step {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #ccd0d4;
}

.livraison-track-step.completed {
    border-left-color: #22c55e;
    background: #f0fdf4;
}

.livraison-track-step.active {
    border-left-color: #3b82f6;
    background: #eff6ff;
}

.livraison-track-step .step-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
}

.livraison-track-step.completed .step-icon {
    background: #22c55e;
    color: #fff;
}

.livraison-track-step.active .step-icon {
    background: #3b82f6;
    color: #fff;
}

.livraison-track-step .step-info {
    flex: 1;
}

.livraison-track-step .step-label {
    font-weight: 600;
    font-size: 14px;
}

.livraison-track-step .step-date {
    font-size: 12px;
    color: #6b7280;
}

.livraison-error {
    color: #dc3232;
    padding: 10px;
    background: #f8d7da;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
}

@media (max-width: 768px) {
    .livraison-orders-header {
        flex-direction: column;
    }
    
    .livraison-orders-search form {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .livraison-orders-search input[type="search"] {
        width: 100%;
    }
    
    .livraison-orders-table-wrap {
        overflow-x: auto;
    }
}






.livraison-orders-wrap {
    max-width: 100%;
    overflow-x: auto;
}

.livraison-orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.livraison-orders-table th {
    background: #f8f9fa;
    padding: 10px 12px;
    text-align: left;
    border-bottom: 2px solid #ddd;
    font-weight: 600;
}

.livraison-orders-table td {
    padding: 10px 12px;
    vertical-align: top;
    border-bottom: 1px solid #eee;
}

.livraison-orders-table tr:hover {
    background: #f8f9fa;
}

.livraison-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.livraison-code-secret {
    display: inline-block;
    font-size: 11px;
    color: #666;
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
}

.livraison-delivery-info {
    font-size: 13px;
    line-height: 1.4;
}

.livraison-delivery-info small {
    display: block;
    margin-top: 2px;
}

.livraison-delivery-info .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    line-height: 14px;
    margin-right: 2px;
}

.livraison-actions {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.livraison-actions .button-small {
    padding: 0 8px;
    line-height: 28px;
    min-height: 28px;
}

.livraison-actions .button-small .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 16px;
    margin: 0;
}

.livraison-text-muted {
    color: #999;
    font-style: italic;
}

.livraison-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #fafafa;
    border-radius: 8px;
}

.livraison-empty-state .dashicons {
    font-size: 60px;
    width: 60px;
    height: 60px;
    color: #ccc;
}

.livraison-empty-state h2 {
    margin: 15px 0 10px;
    font-size: 24px;
    color: #333;
}

.livraison-empty-state p {
    color: #666;
}

.livraison-orders-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 10px 0 15px;
}

.livraison-stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 20px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s;
}

.livraison-stat-item:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

.livraison-stat-item.active {
    background: #007cba;
    border-color: #007cba;
    color: #fff;
}

.livraison-stat-item.active .livraison-stat-label {
    color: #fff;
}

.livraison-stat-count {
    font-weight: 700;
    font-size: 16px;
}

.livraison-stat-label {
    font-size: 13px;
    color: #666;
}

.livraison-orders-search {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 10px 0 15px;
    flex-wrap: wrap;
}

.livraison-orders-search input[type="search"] {
    min-width: 250px;
}

/* Responsive */
@media screen and (max-width: 782px) {
    .livraison-orders-table {
        font-size: 12px;
    }
    
    .livraison-orders-table td,
    .livraison-orders-table th {
        padding: 6px 8px;
    }
    
    .livraison-stat-item {
        padding: 6px 12px;
    }
    
    .livraison-orders-search {
        flex-direction: column;
        align-items: stretch;
    }
    
    .livraison-orders-search input[type="search"] {
        min-width: 100%;
    }
}

.livraison-pagination {
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

.livraison-pagination .page-numbers {
    padding: 8px 14px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
}

.livraison-pagination .page-numbers.current {
    background: #007cba;
    color: #fff;
    border-color: #007cba;
}

.livraison-pagination .page-numbers:hover {
    background: #f0f0f0;
}
