/* Customized Form With Product 页面样式 */

.customized-form-with-product {
    padding: 40px 0 60px;
    background-color: #f7f7f7;
}

/* Progress Steps */
.cfp-steps-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 50px;
    gap: 0;
}

.cfp-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
}

.cfp-step {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    background: #808080;
    color: #fff;
    padding: 0.9375rem 1.875rem;
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 50%, calc(100% - 20px) 100%, 0 100%, 20px 50%);
    transition: all 0.3s ease;
    min-width: 200px;
    justify-content: center;
}

.cfp-step:first-child {
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 50%, calc(100% - 20px) 100%, 0 100%);
    padding-left: 1.875rem;
}

.cfp-step:last-child {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 20px 50%);
    padding-right: 1.875rem;
}

.cfp-step-active {
    background: #4db8a8;
}

.cfp-step-index {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
}

.cfp-step-text {
    font-size: 0.9375rem;
    font-weight: 500;
    white-space: nowrap;
}

/* 产品卡片 */
.cfp-product-card {
    background-color: #ffffff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    padding: 1.25rem;
    margin-bottom: 1.875rem;
}

.cfp-product-image {
    position: relative;
    width: 100%;
    padding-bottom: 75%; /* 4:3 宽高比 */
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    border-radius: 3px;
    overflow: hidden;
}

.cfp-product-image::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23cccccc'%3E%3Cpath d='M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.5;
}

.cfp-product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 3px;
}

.cfp-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.6) 60%, transparent 100%);
    padding: 20px 15px 12px;
    z-index: 1;
}

.cfp-overlay-title {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.cfp-product-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cfp-product-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.cfp-product-estimate {
    margin-bottom: 0.75rem;
}

.cfp-estimate-label {
    font-size: 0.875rem;
    color: #e87e04;
    margin-right: 0.375rem;
}

.cfp-estimate-price {
    font-size: 1.5rem;
    color: #e87e04;
    font-weight: 700;
}

.cfp-estimate-unit {
    font-size: 0.875rem;
    color: #e87e04;
    margin-left: 0.25rem;
}

.cfp-product-meta {
    font-size: 0.875rem;
    color: #555;
}

.cfp-meta-title {
    font-weight: 600;
    margin-bottom: 0.1875rem;
}

.cfp-meta-text {
    margin-bottom: 0.5rem;
}

/* 表单区域 */
.cfp-form-section {
    background-color: #ffffff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    padding: 1.5625rem 1.25rem 1.875rem;
}

.cfp-form-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 0.9375rem;
}

.cfp-form-notes {
    padding-left: 0;
    list-style: none;
    margin-bottom: 1.25rem;
    color: #666;
    font-size: 0.875rem;
}

.cfp-form-notes li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.cfp-form-notes li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: #389d9d;
    font-weight: bold;
    font-size: 1rem;
}

.cfp-form-notes li + li {
    margin-top: 0.5rem;
}

.cfp-form-group {
    margin-bottom: 1.25rem;
}

.cfp-form-group .row {
    display: flex;
    align-items: center;
}

.cfp-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
    color: #333;
    min-width: 180px;
    padding-right: 1rem;
}

/* 必填星号 */
.cfp-required-star{
    color:#e60012;
    margin-left:4px;
    font-weight:700;
}

/* 左右布局 - label和input在同一行 */
.cfp-form-group.cfp-inline-group {
    display: flex;
    align-items: flex-start;
}

.cfp-form-group.cfp-inline-group .cfp-label {
    margin-bottom: 0;
    padding-top: 0.5rem;
    flex-shrink: 0;
}

.cfp-form-group.cfp-inline-group .cfp-form-control-wrapper {
    flex: 1;
}

.cfp-travelers-row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.cfp-travelers-row .cfp-traveler-item {
    border: 1px solid #e4e4e4;
    border-radius: 3px;
    padding: 0.625rem 0.75rem;
    background-color: #fafafa;
    margin-bottom: 0.625rem;
}

.cfp-traveler-label {
    font-size: 0.8125rem;
    margin-bottom: 0.5rem;
    color: #555;
}

.cfp-traveler-type {
    font-weight: 600;
    color: #f25c05;
}

.cfp-traveler-age {
    color: #888;
    font-size: 0.75rem;
}

.cfp-touchspin {
    max-width: 140px;
}

.cfp-date-wrapper .input-group-addon {
    background-color: #fff;
}

.cfp-form textarea.form-control {
    resize: vertical;
    font-size: 0.875rem;
}

.cfp-form .form-control {
    font-size: 0.875rem;
    height: auto;
    padding: 0.35rem 0.75rem;
    border-radius: 3px;
}
.cfp-touchspin{text-align: center;}

.cfp-form .form-control:focus {
    border-color: #389d9d;
    box-shadow: 0 0 0 0.2rem rgba(56, 157, 157, 0.15);
}

.cfp-form-actions {
    text-align: center;
    margin-top: 1.5rem;
}

.cfp-submit-btn {
    padding: 0.75rem 2.5rem;
    font-size: 0.9375rem;
    border-radius: 1.5rem;
    background-color: #389d9d !important;
    border-color: #389d9d !important;
    transition: all 0.3s ease;
}

.cfp-submit-btn:hover,
.cfp-submit-btn:focus {
    background-color: #2d8080 !important;
    border-color: #2d8080 !important;
    box-shadow: 0 2px 8px rgba(56, 157, 157, 0.3);
}

.input-group.bootstrap-touchspin{display: flex;}
.input-group-btn{width: auto;}

/* 成功提示 Modal */
.cfp-success-modal .modal-dialog {
    max-width: 850px;
    width: 90%;
}

.cfp-success-modal .modal-content {
    border-radius: 4px;
}

.cfp-success-modal .modal-header {
    border-bottom: none;
    padding-bottom: 5px;
}

.cfp-steps-wrapper-modal {
    margin-bottom: 0;
    padding: 0;
    overflow: hidden;
}

.cfp-steps-wrapper-modal .cfp-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 0;
}

.cfp-steps-wrapper-modal .cfp-step {
    min-width: auto;
    max-width: none;
    flex: 1;
    padding: 0.9rem 1.6rem;
    font-size: 0.9rem;
    line-height: 1.3;
    text-align: center;
}

.cfp-steps-wrapper-modal .cfp-step-index {
    width: 1.4rem;
    height: 1.4rem;
    font-size: 0.75rem;
    margin-right: 0.25rem;
}

.cfp-steps-wrapper-modal .cfp-step-text {
    font-size: 0.9rem;
    white-space: nowrap; /* 保持单行显示 “Your Quote in 24 Hours” */
}

.cfp-success-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 0.625rem;
}

.cfp-success-text {
    font-size: 0.8125rem;
    color: #555;
    margin-bottom: 0.375rem;
}

.cfp-success-footer {
    text-align: center;
}

.cfp-view-plan-btn {
    padding: 0.5rem 1.5rem;
    border-radius: 1.25rem;
    background-color: #389d9d !important;
    border-color: #389d9d !important;
}

.cfp-view-plan-btn:hover,
.cfp-view-plan-btn:focus {
    background-color: #2d8080 !important;
    border-color: #2d8080 !important;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .cfp-success-modal .modal-dialog {
        max-width: 600px;
        width: 95%;
    }
    
    .cfp-steps-wrapper-modal .cfp-step {
        padding: 0.8rem 0.5rem;
        font-size: 0.85rem;
    }

    .cfp-steps-wrapper-modal .cfp-step-index {
        width: 1.3rem;
        height: 1.3rem;
        font-size: 0.7rem;
    }

    .cfp-steps-wrapper-modal .cfp-step-text {
        font-size: 0.85rem;
    }
}

@media (max-width: 992px) {
    .cfp-step {
        min-width: 160px;
        padding: 0.75rem 1.25rem;
    }

    .cfp-step .cfp-step-text {
        font-size: 0.875rem;
    }
}

@media (max-width: 768px) {
    .customized-form-with-product {
        padding: 40px 0 30px;
    }

    .cfp-steps-wrapper {
        margin-bottom: 30px;
        overflow-x: auto;
        justify-content: flex-start;
        padding: 0 15px;
    }

    .cfp-steps {
        gap: 0;
    }

    .cfp-step {
        min-width: 140px;
        padding: 0.625rem 0.9375rem;
        font-size: 0.8125rem;
    }

    .cfp-step .cfp-step-index {
        width: 1.25rem;
        height: 1.25rem;
        font-size: 0.75rem;
    }

    .cfp-step-text {
        font-size: 0.8125rem;
    }

    .cfp-product-card,
    .cfp-form-section {
        padding: 0.9375rem;
    }

    .cfp-touchspin {
        max-width: 100%;
    }

    .cfp-overlay-title {
        font-size: 0.875rem;
    }

    .cfp-image-overlay {
        padding: 0.9375rem 0.75rem 0.625rem;
    }

    /* 移动端改为上下布局 */
    .cfp-form-group.cfp-inline-group {
        display: block;
    }

    .cfp-form-group.cfp-inline-group .cfp-label {
        margin-bottom: 0.375rem;
        padding-top: 0;
        min-width: auto;
    }

    .cfp-form-title {
        font-size: 1rem;
    }

    .cfp-form-notes {
        font-size: 0.8125rem;
    }
}

@media (max-width: 480px) {
    .customized-form-with-product {
        padding: 30px 0;
    }

    .cfp-steps-wrapper {
        gap: 0;
        margin-bottom: 20px;
    }

    .cfp-step {
        min-width: 110px;
        padding: 0.5rem 0.75rem;
        font-size: 0.6875rem;
    }

    .cfp-step .cfp-step-text {
        font-size: 0.6875rem;
    }

    .cfp-step .cfp-step-index {
        width: 1.125rem;
        height: 1.125rem;
        font-size: 0.6875rem;
    }

    .cfp-product-title {
        font-size: 1rem;
    }

    .cfp-estimate-price {
        font-size: 1.25rem;
    }

    .cfp-success-modal .modal-dialog {
        margin: 1.25rem 0.625rem;
    }

    .cfp-steps-wrapper-modal .cfp-step {
        padding: 0.7rem 0.4rem;
        font-size: 0.8rem;
    }

    .cfp-steps-wrapper-modal .cfp-step-index {
        width: 1.25rem;
        height: 1.25rem;
        font-size: 0.7rem;
    }

    .cfp-steps-wrapper-modal .cfp-step-text {
        font-size: 0.8rem;
    }

    .cfp-overlay-title {
        font-size: 0.8125rem;
        line-height: 1.3;
    }

    .cfp-image-overlay {
        padding: 0.75rem 0.625rem 0.5rem;
    }

    .cfp-form-title {
        font-size: 0.9375rem;
    }

    .cfp-submit-btn {
        font-size: 0.875rem;
        padding: 0.625rem 2rem;
    }
}

