/**
 * Modal 統一樣式
 */

/* Modal 遮罩層 */
.quotation-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.quotation-modal.show {
    display: block;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Modal 內容 */
.modal-content {
    background: #FFFFFF;
    border-radius: 10px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

.modal-large {
    max-width: 900px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal 標題 */
.modal-header {
    background: #004884;
    color: #FFFFFF;
    padding: 20px 25px;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-items: space-between;
    align-items: center;
    position: relative;
}

.modal-header h2 {
    margin: 0;
    font-size: 36px;
    text-align: center;
    flex: 1;
    color: #FFFFFF !important;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom:0 !important;
}

/* 關閉按鈕 */
.modal-close {
    position: absolute !important;
    top: 15px !important;
    right: 20px !important;
    background: none !important;
    border: none !important;
    color: #FFFFFF !important;
    font-size: 32px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    padding: 0 !important;
    width: 30px !important;
    height: 30px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: color 0.2s ease !important;
}

.modal-close:hover {
    color: #6CB4EE !important;
}

/* Modal 主體 */
.modal-body {
    padding: 25px;
}

/* 篩選表單樣式 */
.filter-field {
    margin-bottom: 20px;
    position: relative;
}

.filter-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #004884;
}

/* 篩選 Modal 的下拉箭頭 */
.filter-field:has(select)::after {
    content: '';
    position: absolute;
    right: 15px;
    bottom: 15px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #FFFFFF;
    pointer-events: none;
    z-index: 1;
}

.price-range {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-range input {
    flex: 1;
}

.range-separator {
    color: #666;
}

/* Modal 按鈕 */
.modal-actions {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.btn-confirm {
    background: #004884;
    color: #FFFFFF;
    border: none;
    padding: 12px 40px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-confirm:hover {
    background: #6CB4EE;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 72, 132, 0.3);
}

/* 商品詳細 Modal 樣式 */
.product-detail-container {
    display: flex;
    gap: 30px;
}

.product-image-section {
    flex: 1;
}

.product-image-section img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 3px solid #004884;
}

.product-spec-section {
    flex: 1;
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
    border: 2px solid #004884;
}

.spec-table th,
.spec-table td {
    padding: 12px !important;
}

/* 左側標題欄 - 企業色背景，白色邊框分隔 */
.spec-table th {
    background: #004884 !important;
    background-color: #004884 !important;
    color: #FFFFFF !important;
    font-weight: bold !important;
    text-align: left !important;
    width: 40% !important;
    border: 2px solid #FFFFFF !important;
    border-left: 2px solid #004884 !important;
}

/* 右側數值欄 - 白色背景，企業色邊框 */
.spec-table td {
    background: #FFFFFF !important;
    background-color: #FFFFFF !important;
    color: #333 !important;
    border: 2px solid #004884 !important;
    border-right: 2px solid #004884 !important;
}

/* 產品操作按鈕 */
.product-actions {
    display: flex;
    gap: 15px;
}

.btn-action {
    flex: 1;
    background: #004884;
    color: #FFFFFF;
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-action:hover {
    background: #6CB4EE;
}

.btn-hint {
    display: none;
}

/* 確認彈窗樣式 */
.modal-confirm {
    max-width: 600px;
}

.confirm-message {
    text-align: center;
    margin-bottom: 30px;
}

.confirm-message p {
    font-size: 18px;
    color: #004884;
    line-height: 2;
    margin: 10px 0;
    font-weight: 500;
}

/* 成功彈窗樣式 */
.modal-success {
    max-width: 650px;
}

.success-icon {
    text-align: center;
    margin-bottom: 20px;
}

.success-message {
    text-align: center;
    margin-bottom: 30px;
}

.success-message .message-main {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.6;
}

.success-message .message-timeline {
    font-size: 16px;
    color: #666;
}

.success-message .highlight-red {
    color: #E74C3C;
    font-weight: bold;
    font-size: 18px;
}

.staff-contact {
    background: #F2F2F2;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.staff-contact h3 {
    color: #004884;
    font-size: 18px;
    margin: 0 0 15px 0;
    text-align: center;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background: #FFFFFF;
    border-radius: 6px;
}

.contact-item .label {
    font-weight: bold;
    color: #004884;
    min-width: 100px;
}

.contact-item .value {
    color: #333;
    font-weight: normal;
}

/* 響應式設計 */
@media screen and (max-width: 768px) {
    .modal-content {
        max-width: 95%;
    }

    .product-detail-container {
        flex-direction: column;
    }

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

    .btn-action {
        width: 100%;
    }

    .modal-confirm,
    .modal-success {
        max-width: 95%;
    }

    .contact-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .contact-item .label {
        min-width: auto;
    }
}
