/**
 * DeployEcommerce_RequestForQuote
 *
 * @category    DeployEcommerce
 * @package     DeployEcommerce_RequestForQuote
 * @copyright   Copyright (c) 2025 DeployEcommerce
 * @license     https://www.deployecommerce.com/license
 */

/* Quote List */
.block-rfq-quotes .block-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 15px;
}

.table-rfq-quotes {
    width: 100%;
}

.table-rfq-quotes th,
.table-rfq-quotes td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

/* Status Labels */
.quote-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending { background: #fff8e1; color: #f57f17; }
.status-submitted { background: #e3f2fd; color: #1565c0; }
.status-review { background: #fce4ec; color: #ad1457; }
.status-quoted { background: #e8f5e9; color: #2e7d32; }
.status-negotiation { background: #f3e5f5; color: #7b1fa2; }
.status-approved { background: #c8e6c9; color: #1b5e20; }
.status-rejected { background: #ffcdd2; color: #c62828; }
.status-expired { background: #eceff1; color: #546e7a; }
.status-ordered { background: #bbdefb; color: #0d47a1; }
.status-cancelled { background: #f5f5f5; color: #616161; }

/* Quote View */
.block-rfq-quote-view .block-title {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.block-rfq-quote-view .box {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

.block-rfq-quote-view .box-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

/* Quote Items Table */
.table-quote-items {
    width: 100%;
    background: #fff;
}

.table-quote-items th {
    background: #f5f5f5;
    padding: 10px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
}

.table-quote-items td {
    padding: 15px 10px;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: middle;
}

.table-quote-items .product-item-details {
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-quote-items .product-image-photo {
    border: 1px solid #e0e0e0;
    border-radius: 3px;
}

.price-saving {
    color: #2e7d32;
    font-weight: 600;
}

.no-quoted-price {
    color: #9e9e9e;
    font-style: italic;
}

/* Negotiation Timeline */
.negotiation-timeline {
    position: relative;
    padding-left: 30px;
}

.negotiation-timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e0e0e0;
}

.timeline-item {
    position: relative;
    padding-bottom: 20px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -25px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #9e9e9e;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #e0e0e0;
}

.timeline-item.action-success .timeline-marker { background: #2e7d32; }
.timeline-item.action-quoted .timeline-marker { background: #1565c0; }
.timeline-item.action-error .timeline-marker { background: #c62828; }
.timeline-item.action-submitted .timeline-marker { background: #f57f17; }

.timeline-content {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 12px;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.timeline-action {
    font-weight: 600;
    color: #333;
}

.timeline-date {
    font-size: 12px;
    color: #9e9e9e;
}

.timeline-comment {
    padding: 8px;
    background: #f5f5f5;
    border-radius: 3px;
    margin-bottom: 8px;
}

.timeline-author {
    font-size: 12px;
    color: #757575;
}

/* Quote Actions */
.box-quote-actions {
    background: #fff !important;
}

.quote-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.quote-actions .action {
    padding: 10px 20px;
}

.quote-actions .action.cancel {
    background: #f5f5f5;
    color: #616161;
    border: 1px solid #e0e0e0;
}

.add-comment-section {
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.add-comment-section strong {
    display: block;
    margin-bottom: 10px;
}

/* Create Form */
.form-rfq-create .fieldset {
    margin-bottom: 20px;
}

.form-rfq-create .legend {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.create-from-cart-option {
    text-align: center;
    padding: 20px;
    background: #e8f5e9;
    border-radius: 4px;
    margin-bottom: 20px;
}

.create-from-cart-option .separator {
    margin: 15px 0;
    color: #9e9e9e;
}

/* Responsive */
@media (max-width: 767px) {
    .table-rfq-quotes,
    .table-quote-items {
        display: block;
    }

    .table-rfq-quotes thead,
    .table-quote-items thead {
        display: none;
    }

    .table-rfq-quotes tbody tr,
    .table-quote-items tbody tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #e0e0e0;
        border-radius: 4px;
    }

    .table-rfq-quotes td,
    .table-quote-items td {
        display: block;
        text-align: right;
        padding: 10px;
        border-bottom: 1px solid #f0f0f0;
    }

    .table-rfq-quotes td::before,
    .table-quote-items td::before {
        content: attr(data-th) ': ';
        float: left;
        font-weight: 600;
    }

    .table-quote-items .product-item-details {
        flex-direction: column;
        align-items: flex-end;
    }

    .quote-actions {
        flex-direction: column;
    }

    .quote-actions .action {
        width: 100%;
        text-align: center;
    }
}
