/* WooCommerce 报价功能插件 - 新版样式 */

/* 容器样式 */
.wc-quote-new-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* 头部样式 */
.wc-quote-new-header {
    background-color: #2196F3;
    padding: 25px;
    border-bottom: 4px solid #1976D2;
    border-radius: 8px 8px 0 0;
    margin: -20px -20px 25px -20px;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.wc-quote-new-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(40%, -40%);
}

.wc-quote-new-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    transform: translate(-50%, 50%);
}

.wc-quote-new-header h2 {
    margin: 0 0 10px 0;
    font-size: 28px;
    color: white;
    font-weight: 600;
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.wc-quote-new-header p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

/* 搜索区域样式 */
.wc-quote-new-search-section {
    position: relative;
    margin-bottom: 30px;
}

.wc-quote-new-search-form {
    display: flex;
    gap: 10px;
}

#wc-quote-new-search-input {
    flex: 1;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.3s;
}

#wc-quote-new-search-input:focus {
    border-color: #4CAF50;
}

#wc-quote-new-search-button {
    padding: 12px 24px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

#wc-quote-new-search-button:hover {
    background-color: #45a049;
}

/* 搜索结果样式 */
.wc-quote-new-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 5px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    display: none;
}

.wc-quote-new-search-results-list {
    padding: 5px 0;
}

.wc-quote-new-search-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin-bottom: 8px;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transform: translateY(0);
}

.wc-quote-new-search-result:hover {
    background-color: #f9f9f9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.wc-quote-new-search-result:hover {
    background-color: #f9f9f9;
}

.wc-quote-new-product-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.wc-quote-new-product-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.wc-quote-new-product-details {
    flex: 1;
}

.wc-quote-new-product-name {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
}

.wc-quote-new-product-sku {
    font-size: 14px;
    color: #666;
    margin-bottom: 3px;
}

.wc-quote-new-product-price {
    font-size: 16px;
    font-weight: 600;
    color: #4CAF50;
    margin-bottom: 3px;
}

.wc-quote-new-product-stock {
    font-size: 13px;
    color: #888;
}

.add-to-quote-btn {
    background-color: #2196F3;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.3);
    font-size: 14px;
    white-space: nowrap;
}

.add-to-quote-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s ease;
    z-index: -1;
}

.add-to-quote-btn:hover:not(:disabled) {
    background-color: #1976D2;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.4);
}

.add-to-quote-btn:hover:not(:disabled)::before {
    left: 100%;
}

.add-to-quote-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.3);
}

.add-to-quote-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 搜索消息样式 */
.wc-quote-new-search-message,
.wc-quote-new-search-error,
.wc-quote-new-search-loading {
    padding: 15px;
    text-align: center;
    color: #666;
}

.wc-quote-new-search-error {
    color: #f44336;
}

/* 产品列表样式 */
.wc-quote-new-products-section {
    margin-bottom: 30px;
}

.wc-quote-new-products-section h3 {
    color: #333;
    font-size: 20px;
    margin-bottom: 20px;
    font-weight: 600;
}

.wc-quote-new-products-list {
    min-height: 200px;
    border: 2px solid #f0f0f0;
    border-radius: 6px;
    padding: 20px;
}

.wc-quote-new-empty-state {
    text-align: center;
    color: #999;
    font-size: 16px;
    padding: 40px 20px;
}

/* 产品表格样式 */
.wc-quote-new-products-table {
    width: 100%;
    border-collapse: collapse;
}

.wc-quote-new-products-table th {
    text-align: left;
    padding: 12px;
    background-color: #f8f9fa;
    color: #666;
    font-weight: 600;
    border-bottom: 2px solid #ddd;
}

.wc-quote-new-products-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #eee;
}

.wc-quote-new-products-table tr:last-child td {
    border-bottom: none;
}

.wc-quote-new-product-info-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wc-quote-new-product-thumbnail {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.wc-quote-new-product-price-cell,
.wc-quote-new-product-subtotal-cell {
    font-weight: 600;
    color: #333;
}

/* 数量控制样式 */
.quantity-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background-color: #f5f5f5;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.quantity-btn:first-child {
    border-radius: 4px 0 0 4px;
}

.quantity-btn:last-child {
    border-radius: 0 4px 4px 0;
}

.quantity-btn:hover {
    background-color: #e0e0e0;
}

.quantity-btn:active {
    background-color: #d0d0d0;
}

.product-quantity {
    width: 60px;
    height: 30px;
    padding: 5px;
    border: 1px solid #ddd;
    border-left: none;
    border-right: none;
    text-align: center;
    font-size: 14px;
}

/* 折扣控制样式 */
.discount-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-discount-slider {
    width: 100px;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    transition: all 0.3s ease;
}

.product-discount-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #007cba;
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-discount-slider::-webkit-slider-thumb:hover {
    background: #006ba1;
    transform: scale(1.2);
}

.product-discount-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #007cba;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.product-discount-slider::-moz-range-thumb:hover {
    background: #006ba1;
    transform: scale(1.2);
}

.product-discount {
    width: 50px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

.discount-percent {
    color: #666;
    font-size: 14px;
    min-width: 18px;
}

/* 产品项动画效果 */
.wc-quote-new-product-item {
    transition: all 0.3s ease;
    background-color: white;
}

.wc-quote-new-product-item:hover {
    background-color: #f8f9fa;
}

/* 产品添加动画 */
@keyframes productAdd {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.wc-quote-new-product-item.adding {
    animation: productAdd 0.5s ease-out;
}

/* 摘要信息样式 */
.wc-quote-new-summary {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    border: 1px solid #eee;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}

.summary-row:last-child {
    margin-bottom: 0;
    font-weight: bold;
    font-size: 16px;
    color: #007cba;
}

.remove-product-btn {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(244, 67, 54, 0.2);
    font-size: 14px;
}

.remove-product-btn:hover {
    background-color: #d32f2f;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(244, 67, 54, 0.3);
}

.remove-product-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(244, 67, 54, 0.2);
}

/* 汇总区域样式 */
.wc-quote-new-summary-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.wc-quote-new-total {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.wc-quote-new-total-label {
    font-size: 18px;
    color: #333;
}

.wc-quote-new-total-price {
    font-size: 32px;
    font-weight: 700;
    color: #4CAF50;
}

.wc-quote-new-save-button {
    padding: 14px 28px;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.wc-quote-new-save-button:hover:not(:disabled) {
    background-color: #1976D2;
}

.wc-quote-new-save-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* 通知样式 */
.wc-quote-new-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 18px 24px;
    background: #4CAF50;
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 9999;
    max-width: 350px;
    word-wrap: break-word;
    font-size: 14px;
    line-height: 1.4;
    border-left: 4px solid rgba(255, 255, 255, 0.3);
    opacity: 1;
}

.wc-quote-new-notification.success {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border-left-color: #81c784;
}

.wc-quote-new-notification.error {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    border-left-color: #ff5252;
}

.wc-quote-new-notification.warning {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    border-left-color: #ffb74d;
}

.wc-quote-new-notification.show {
    transform: translateX(0);
    animation: notificationBounce 0.5s ease;
}

@keyframes notificationBounce {
    0% { transform: translateX(100%); }
    60% { transform: translateX(-10px); }
    80% { transform: translateX(5px); }
    100% { transform: translateX(0); }
}

/* 响应式通知 */
@media (max-width: 768px) {
    .wc-quote-new-notification {
        right: 10px;
        left: 10px;
        max-width: none;
        top: 80px;
    }
}

/* 报价请求表单样式 */
.wc-quote-new-request-form-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.wc-quote-new-request-form-container.show {
    opacity: 1;
    pointer-events: auto;
}

.wc-quote-new-form-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    transition: background-color 0.3s ease;
}

.wc-quote-new-form-content {
    position: relative;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    z-index: 10002;
}

.wc-quote-new-request-form-container.show .wc-quote-new-form-content {
    transform: translateY(0);
}

.wc-quote-new-form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.wc-quote-new-form-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.wc-quote-new-form-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.wc-quote-new-form-close:hover {
    background-color: #f0f0f0;
    color: #333;
}

.wc-quote-new-form-body {
    padding: 20px;
}

.wc-quote-new-form-group {
    margin-bottom: 20px;
}

.wc-quote-new-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.wc-quote-new-form-group input,
.wc-quote-new-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.wc-quote-new-form-group input:focus,
.wc-quote-new-form-group textarea:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.wc-quote-new-form-group textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.wc-quote-new-form-group label[for="wc-quote-new-name"],
.wc-quote-new-form-group label[for="wc-quote-new-email"] {
    position: relative;
}

.wc-quote-new-form-group label[for="wc-quote-new-name"]::after,
.wc-quote-new-form-group label[for="wc-quote-new-email"]::after {
    content: '*';
    color: #f44336;
    margin-left: 5px;
}

.wc-quote-new-form-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #eee;
    background-color: #f9f9f9;
    border-radius: 0 0 10px 10px;
}

.wc-quote-new-form-cancel,
.wc-quote-new-form-submit {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wc-quote-new-form-cancel {
    background-color: #f5f5f5;
    color: #666;
}

.wc-quote-new-form-cancel:hover {
    background-color: #e0e0e0;
}

.wc-quote-new-form-submit {
    background-color: #2196F3;
    color: white;
}

.wc-quote-new-form-submit:hover:not(:disabled) {
    background-color: #1976D2;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.3);
}

.wc-quote-new-form-submit:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .wc-quote-new-container {
        padding: 15px;
    }
    
    .wc-quote-new-header h2 {
        font-size: 24px;
    }
    
    .wc-quote-new-search-form {
        flex-direction: column;
    }
    
    .wc-quote-new-search-result {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .wc-quote-new-product-info {
        width: 100%;
    }
    
    .add-to-quote-btn {
        align-self: flex-end;
    }
    
    .wc-quote-new-products-table {
        display: block;
        overflow-x: auto;
    }
    
    .wc-quote-new-summary-section {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .wc-quote-new-total-price {
        font-size: 28px;
    }
    
    /* 响应式表单 */
    .wc-quote-new-form-content {
        width: 95%;
        margin: 20px;
    }
    
    .wc-quote-new-form-footer {
        flex-direction: column;
    }
    
    .wc-quote-new-form-cancel,
    .wc-quote-new-form-submit {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .wc-quote-new-header h2 {
        font-size: 20px;
    }
    
    .wc-quote-new-product-image {
        width: 50px;
        height: 50px;
    }
    
    .wc-quote-new-product-name {
        font-size: 14px;
    }
    
    .wc-quote-new-total-price {
        font-size: 24px;
    }
    
    .wc-quote-new-save-button {
        padding: 12px 20px;
        font-size: 16px;
    }
}
