#inquiryModal .modal-dialog {
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
}

#inquiryModal .modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

#inquiryModal .modal-header {
    background: linear-gradient(135deg, #28527a 0%, #3a6fa5 100%);
    padding: 16px 24px;
    border-bottom: none;
}

#inquiryModal .modal-header .modal-title {
    color: #fff;
    font-weight: 600;
    font-size: 18px;
}

#inquiryModal .modal-header .btn-close {
    color: #fff;
    opacity: 0.8;
}

#inquiryModal .modal-header .btn-close:hover {
    opacity: 1;
}

#inquiryModal .modal-body {
    padding: 24px;
    max-height: calc(90vh - 140px);
    overflow-y: auto;
}

#inquiryModal .modal-footer {
    padding: 16px 24px;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    gap: 10px;
}

#inquiryModal .form-label {
    font-weight: 600;
    color: #212529;
    margin-bottom: 6px;
}

#inquiryModal .form-control {
    border-radius: 8px;
    border: 1px solid #e9ecef;
    padding: 10px 14px;
    font-size: 14px;
    transition: all 0.2s ease;
}

#inquiryModal .form-control:focus {
    outline: none;
    border-color: #28527a;
    box-shadow: 0 0 0 3px rgba(40, 82, 122, 0.1);
}

#inquiryModal .form-control::placeholder {
    color: #adb5bd;
}

#inquiryModal textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.inquiry-modal-attachments .help-text {
    font-size: 0.875rem;
    color: #6c757d;
}

.inquiry-modal-attachments .attachment-item {
    display: inline-flex;
    align-items: center;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 6px 10px;
    margin: 4px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.inquiry-modal-attachments .attachment-item:hover {
    background-color: #e9ecef;
}

.inquiry-modal-attachments .attachment-item .remove-btn {
    margin-left: 8px;
    cursor: pointer;
    color: #dc3545;
    font-size: 0.75rem;
    padding: 2px 4px;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.inquiry-modal-attachments .attachment-item .remove-btn:hover {
    color: #fff;
    background-color: #dc3545;
}

.country-search-wrapper {
    position: relative;
}

.country-search-wrapper .country-dropdown-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 250px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    z-index: 1050;
    display: none;
}

.country-search-wrapper .country-dropdown-list.show {
    display: block;
}

.country-search-wrapper .country-dropdown-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.2s ease;
}

.country-search-wrapper .country-dropdown-item:hover,
.country-search-wrapper .country-dropdown-item.active {
    background-color: #f0f7ff;
    color: #28527a;
}

.inquiry-product-header {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 13px;
    color: #495057;
}

.inquiry-product-header-info {
    flex-grow: 1;
}

.inquiry-product-header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 220px;
    justify-content: flex-end;
}

.inquiry-product-header-warehouse {
    width: 90px;
    text-align: right;
}

.inquiry-product-header-actions {
    width: 110px;
    text-align: right;
}

.inquiry-product-item {
    display: flex;
    align-items: center;
    padding: 14px;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    margin-bottom: 8px;
    background-color: #fff;
    gap: 14px;
    transition: all 0.2s ease;
}

.inquiry-product-item:hover {
    border-color: #28527a;
    box-shadow: 0 2px 8px rgba(40, 82, 122, 0.08);
}

.inquiry-product-item img {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
}

.inquiry-product-info {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.inquiry-product-info .product-name {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
    color: #212529;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.4;
}

.inquiry-product-info .product-variant {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.4;
}

.inquiry-product-info .product-price {
    font-size: 14px;
    color: #28527a;
    font-weight: 600;
    line-height: 1.4;
}

.inquiry-product-right {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 12px;
    width: 220px;
}

.inquiry-product-warehouse {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    width: 90px;
}

.inquiry-product-warehouse .warehouse-select {
    width: 100%;
    padding: 7px 8px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    background-color: #fff;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236c757d' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px 8px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.inquiry-product-warehouse .warehouse-select:focus {
    outline: none;
    border-color: #28527a;
    box-shadow: 0 0 0 3px rgba(40, 82, 122, 0.1);
}

.inquiry-product-warehouse .warehouse-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 7px 8px;
    font-size: 12px;
    font-weight: 500;
    color: #495057;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    white-space: nowrap;
    box-sizing: border-box;
}

.warehouse-mobile-label,
.quantity-mobile-label {
    display: none;
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 4px;
    line-height: 1.2;
}

.inquiry-product-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    width: 110px;
}

.inquiry-product-actions .quantity-input {
    width: 60px;
    text-align: center;
    padding: 7px 8px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.inquiry-product-actions .quantity-input:focus {
    outline: none;
    border-color: #28527a;
    box-shadow: 0 0 0 3px rgba(40, 82, 122, 0.1);
}

.inquiry-product-actions .remove-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 500;
    color: #dc3545;
    cursor: pointer;
    background: transparent;
    border: 1px solid #dc3545;
    border-radius: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
    gap: 4px;
    min-width: 70px;
}

.inquiry-product-actions .remove-btn:hover {
    color: #fff;
    background-color: #dc3545;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.25);
}

.inquiry-product-actions .remove-btn i {
    font-size: 10px;
}

@media (max-width: 768px) {
    .inquiry-product-header {
        padding: 8px 12px;
        font-size: 12px;
    }

    .inquiry-product-header-right {
        width: 180px;
        gap: 15px;
    }

    .inquiry-product-header-warehouse {
        width: 70px;
    }

    .inquiry-product-header-actions {
        width: 90px;
    }

    .inquiry-product-item {
        flex-wrap: wrap;
        padding: 12px;
        gap: 12px;
    }

    .inquiry-product-item img {
        width: 56px;
        height: 56px;
    }

    .inquiry-product-info {
        flex-basis: calc(100% - 68px);
        min-width: 0;
        order: 2;
    }

    .inquiry-product-info .product-name {
        font-size: 14px;
    }

    .inquiry-product-info .product-variant {
        font-size: 11px;
    }

    .inquiry-product-info .product-price {
        font-size: 13px;
    }

    .inquiry-product-right {
        width: 100%;
        order: 3;
        justify-content: space-between;
        align-items: flex-start;
        padding-top: 12px;
        border-top: 1px solid #f0f0f0;
        gap: 15px;
    }

    .inquiry-product-warehouse {
        flex: 1;
        width: auto;
        min-width: 130px;
        align-items: flex-start;
    }

    .inquiry-product-warehouse .warehouse-select {
        width: 100%;
        padding: 6px 24px 6px 8px;
        font-size: 12px;
        text-align: left;
    }

    .inquiry-product-warehouse .warehouse-label {
        width: 100%;
        text-align: left;
    }

    .warehouse-mobile-label,
    .quantity-mobile-label {
        display: block;
        white-space: nowrap;
    }

    .inquiry-product-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        width: auto;
    }

    .inquiry-product-actions .quantity-input {
        width: 60px;
        font-size: 12px;
        padding: 6px 8px;
        align-self: flex-start;
    }

    .inquiry-product-actions .remove-btn {
        padding: 5px 10px;
        font-size: 11px;
        align-self: flex-end;
    }

    /* Header is redundant once each row has its own labels */
    .inquiry-product-header {
        display: none;
    }
}

@media (max-width: 576px) {
    #inquiryModal .modal-dialog {
        max-width: 100%;
        width: 100%;
        margin: 0;
        max-height: 100vh;
    }

    #inquiryModal .modal-content {
        border-radius: 0;
        height: 100vh;
        display: flex;
        flex-direction: column;
    }

    #inquiryModal .modal-header {
        padding: 14px 16px;
    }

    #inquiryModal .modal-header .modal-title {
        font-size: 16px;
    }

    #inquiryModal .modal-body {
        padding: 16px;
        flex-grow: 1;
        max-height: none;
    }

    #inquiryModal .modal-footer {
        padding: 12px 16px;
        flex-shrink: 0;
    }

    #inquiryModal .form-control {
        padding: 10px 12px;
        font-size: 14px;
    }

    #inquiryModal textarea.form-control {
        min-height: 80px;
    }
}