/**
 * CrowdOrigin Orders Styles
 */

/* Order Summary */
.co-order-summary {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 4px;
}

.co-order-summary h3 {
    margin-top: 0;
    margin-bottom: 15px;
}

.co-order-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.co-order-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.co-item-image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.co-item-details {
    flex: 1;
}

.co-item-details h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
}

.co-item-quantity,
.co-item-price {
    margin: 5px 0;
    color: #666;
}

.co-item-price {
    font-weight: 600;
    color: #333;
}

/* Order Notes */
.co-order-notes-section {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
}

.co-order-notes-section h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.co-order-notes-section textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}

/* Address Management */
.co-address-management {
    margin-bottom: 20px;
}

/* Payment Method Info */
.co-payment-method-info {
    margin: 15px 0;
    padding: 10px;
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    border-radius: 4px;
}

.co-payment-security {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.co-payment-security .dashicons {
    color: #4caf50;
}

/* Order Confirmation */
.co-order-confirmation {
    margin: 30px 0;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 8px;
}

.co-confirmation-header {
    text-align: center;
    margin-bottom: 30px;
}

.co-confirmation-header h2 {
    color: #4caf50;
    margin-bottom: 10px;
}

.co-order-number {
    font-size: 18px;
    color: #666;
}

.co-order-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.co-detail-section {
    padding: 15px;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.co-detail-section h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
    border-bottom: 2px solid #4caf50;
    padding-bottom: 5px;
}

.co-detail-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.co-detail-section li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
}

.co-detail-section li:last-child {
    border-bottom: none;
}

.co-item-qty {
    color: #666;
    margin: 0 10px;
}

.co-item-total {
    font-weight: 600;
}

.co-order-total {
    font-size: 24px;
    font-weight: 700;
    color: #4caf50;
    margin: 10px 0 0 0;
}

.co-order-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Order Search */
.co-order-search {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
}

.co-order-search input {
    width: 70%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.co-order-search button {
    margin-left: 10px;
}

#co-order-search-results {
    margin-top: 15px;
}

.co-search-results {
    list-style: none;
    padding: 0;
    margin: 0;
}

.co-search-results li {
    padding: 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
}

.co-search-results a {
    text-decoration: none;
    color: #333;
}

.co-search-results a:hover {
    color: #4caf50;
}

/* Order Status */
.co-order-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.co-order-status.status-pending {
    background: #fff3cd;
    color: #856404;
}

.co-order-status.status-processing {
    background: #cfe2ff;
    color: #084298;
}

.co-order-status.status-completed {
    background: #d1e7dd;
    color: #0f5132;
}

.co-order-status.status-cancelled {
    background: #f8d7da;
    color: #842029;
}

.co-order-status.status-refunding {
    background: #fff3cd;
    color: #856404;
}

/* Order Tracking */
.co-order-tracking {
    margin: 30px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 4px;
}

.co-order-tracking h3 {
    margin-top: 0;
    margin-bottom: 20px;
}

.co-tracking-timeline {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
    padding-left: 30px;
}

.co-tracking-timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #ddd;
}

.co-tracking-item {
    position: relative;
    padding: 15px 0 15px 30px;
    margin-bottom: 20px;
}

.co-tracking-item::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 20px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #4caf50;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px #4caf50;
}

.co-tracking-status {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 5px;
}

.co-tracking-message {
    color: #666;
    margin-bottom: 5px;
}

.co-tracking-date {
    font-size: 12px;
    color: #999;
}

/* Cancel Order */
.co-cancel-order {
    margin: 20px 0;
    text-align: center;
}

.co-cancel-order-button {
    background: #dc3545;
    color: #fff;
    border: none;
}

.co-cancel-order-button:hover {
    background: #c82333;
}

/* Order Actions */
.co-order-actions {
    margin: 20px 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 768px) {
    .co-order-details {
        grid-template-columns: 1fr;
    }
    
    .co-order-actions {
        flex-direction: column;
    }
    
    .co-order-actions .button {
        width: 100%;
    }
    
    .co-order-search input {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .co-order-search button {
        width: 100%;
        margin-left: 0;
    }
}
