/* Consignment Button */
.wccs-consignment-button-wrapper {
    margin: 10px 0;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f9f9f9;
}

.wccs-consignment-button-wrapper .wccs-message {
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
}

.wccs-consignment-button-wrapper .wccs-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.wccs-consignment-button-wrapper .wccs-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.wccs-add-to-consignment {
    margin-right: 10px !important;
}

/* Consignment Cart */
.wccs-consignment-cart {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.wccs-consignment-cart h2 {
    margin-top: 0;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
}

.wccs-status {
    display: inline-block;
    padding: 5px 15px;
    margin: 10px 0;
    background: #f0f0f0;
    border-radius: 20px;
    font-weight: bold;
}

.wccs-cart-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.wccs-cart-table th {
    background: #f8f8f8;
    padding: 12px;
    text-align: left;
    font-weight: bold;
    border-bottom: 2px solid #ddd;
}

.wccs-cart-table td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
    vertical-align: middle;
}

.wccs-cart-table tfoot td {
    border-top: 2px solid #333;
    font-weight: bold;
    padding: 15px 12px;
}

.wccs-cart-table input[type="number"] {
    width: 70px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.wccs-total-label {
    text-align: right;
    padding-right: 20px;
}

.wccs-total-value {
    font-size: 1.2em;
    color: #007cba;
}

.wccs-actions {
    margin: 20px 0;
    padding: 20px 0;
    border-top: 1px solid #ddd;
}

.wccs-actions .button {
    margin-right: 10px;
}

.wccs-approved-consignment {
    margin: 20px 0;
}

.wccs-split-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.wccs-split-group label {
    display: flex;
    flex-direction: column;
    font-size: 0.8em;
    color: #555;
    gap: 2px;
}

.wccs-split-input {
    width: 60px;
    padding: 4px;
    text-align: center;
}

.wccs-split-quickfill {
    display: flex;
    gap: 6px;
    margin-bottom: 4px;
}

.wccs-split-quickfill button {
    font-size: 0.75em;
    padding: 2px 8px;
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
}

.wccs-split-quickfill button:hover {
    background: #e0e0e0;
}

.wccs-split-remaining {
    font-size: 0.8em;
    font-weight: 600;
}

.wccs-remaining-ok {
    color: #2e8b2e;
}

.wccs-remaining-error {
    color: #dc3545;
}

#wccs-reconcile-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.wccs-remove-item {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.9em;
    padding: 0;
}

.wccs-remove-item:hover {
    color: #a71d2a;
}

.wccs-saving-indicator {
    font-size: 0.85em;
    color: #666;
    margin: 8px 0 0;
    text-align: right;
}

.wccs-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #ddd;
    border-top-color: #007cba;
    border-radius: 50%;
    animation: wccs-spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes wccs-spin {
    to { transform: rotate(360deg); }
}

#wccs-cart-items-body tr.wccs-row-removing {
    opacity: 0.4;
    transition: opacity 0.15s ease;
}

.wccs-pending-consignment {
    margin: 20px 0;
    padding: 20px;
    background: #fff9e6;
    border: 1px solid #ffe58f;
    border-radius: 4px;
}

.wccs-pending-consignment > p:first-child {
    margin-top: 0;
    font-size: 1.05em;
}

.wccs-sell-quantity {
    width: 60px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-right: 5px;
}

.wccs-sell-item {
    background: #28a745 !important;
    border-color: #28a745 !important;
    color: #fff !important;
}

.wccs-sell-item:hover {
    background: #218838 !important;
    border-color: #1e7e34 !important;
}

/* History */
.wccs-history {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

.wccs-history h3 {
    margin-top: 0;
}

.wccs-history-list {
    list-style: none;
    padding: 0;
    max-height: 300px;
    overflow-y: auto;
}

.wccs-history-list li {
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f0;
}

.wccs-history-date {
    color: #666;
    font-size: 0.9em;
}

.wccs-history-status {
    display: inline-block;
    padding: 2px 8px;
    margin: 0 5px;
    background: #f0f0f0;
    border-radius: 10px;
    font-size: 0.9em;
}

.wccs-history-note {
    color: #555;
}

/* Status Badges */
.wccs-status-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: bold;
}

.status-draft {
    background: #f8f9fa;
    color: #6c757d;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-approved {
    background: #d4edda;
    color: #155724;
}

.status-partially_completed {
    background: #cce5ff;
    color: #004085;
}

.status-completed {
    background: #28a745;
    color: #fff;
}

.status-cancelled {
    background: #dc3545;
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .wccs-cart-table {
        font-size: 0.9em;
    }
    
    .wccs-cart-table th,
    .wccs-cart-table td {
        padding: 8px;
    }
    
    .wccs-cart-table input[type="number"] {
        width: 50px;
    }
    
    .wccs-actions .button {
        display: block;
        width: 100%;
        margin: 5px 0;
        text-align: center;
    }
}
