/* Pretendard 폰트 불러오기 */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');

.cleanh-calculator-widget-consumer {
    --cleanh-primary-color: #1A3A5F;
    --cleanh-secondary-color: #6c757d;
    --cleanh-light-bg: #f8f9fa;
    --cleanh-border-color: #dee2e6;
    --cleanh-accent-color: #0d6efd;
    font-family: 'Pretendard', sans-serif;
    background-color: #ffffff;
    padding: 80px 20px;
    box-sizing: border-box; /* Include padding in element's total width and height */
}

.cleanh-calculator-widget-consumer *,
.cleanh-calculator-widget-consumer *::before,
.cleanh-calculator-widget-consumer *::after {
    box-sizing: inherit; /* Inherit box-sizing from parent */
}

.cleanh-calculator-widget-consumer .calculator-container {
    max-width: 1200px;
    margin: 0 auto;
}

.cleanh-calculator-widget-consumer .section-headline {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    color: var(--cleanh-primary-color);
    line-height: 1.4;
    margin-bottom: 15px;
    margin-top: 0; /* Reset default margin */
}

.cleanh-calculator-widget-consumer .section-subtitle {
    text-align: center;
    font-size: 18px;
    color: var(--cleanh-secondary-color);
    margin-bottom: 60px;
     margin-top: 0; /* Reset default margin */
}

.cleanh-calculator-widget-consumer .calculator-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
}

@media (min-width: 992px) {
    .cleanh-calculator-widget-consumer .calculator-grid {
        grid-template-columns: 1fr 1fr;
        gap: 80px;
    }
}

.cleanh-calculator-widget-consumer .form-col .form-group {
    margin-bottom: 25px;
}

.cleanh-calculator-widget-consumer .form-col label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 10px;
}

.cleanh-calculator-widget-consumer .form-col .form-control {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    line-height: 1.5; /* Ensure text doesn't touch borders */
    border: 1px solid var(--cleanh-border-color);
    border-radius: 8px;
    background-color: var(--cleanh-light-bg);
    -webkit-appearance: none; /* Remove default iOS styling */
    -moz-appearance: none;    /* Remove default Firefox styling */
    appearance: none;         /* Remove default styling */
    box-sizing: border-box; /* Ensure padding is included in width */
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out; /* Add transition for focus */
}

.cleanh-calculator-widget-consumer .form-col input.form-control {
    -webkit-appearance: auto; /* Restore default input appearance if needed */
    -moz-appearance: auto;
    appearance: auto;
}

.cleanh-calculator-widget-consumer .form-col select.form-control {
    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='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px 12px;
    padding-right: 3rem; /* Make space for the arrow */
}

.cleanh-calculator-widget-consumer .form-col .form-control:focus {
     border-color: #86b7fe; /* Example focus style */
     outline: 0;
     box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, .25); /* Example focus style */
}


.cleanh-calculator-widget-consumer .form-col select.form-control:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
    opacity: 0.7;
    background-image: none; /* Remove arrow when disabled */
}

.cleanh-calculator-widget-consumer .address-dongho-container {
    display: flex;
    gap: 10px;
}

.cleanh-calculator-widget-consumer .address-dongho-container input {
    flex: 1; /* Make inputs share space equally */
}

.cleanh-calculator-widget-consumer #spec-display-consumer {
    margin-top: 15px;
    padding: 15px;
    background-color: #fff;
    border: 1px solid var(--cleanh-border-color);
    border-radius: 8px;
    font-weight: 500;
    color: #333;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap; /* Allow wrapping on small screens */
    min-height: 50px; /* Ensure consistent height */
}

.cleanh-calculator-widget-consumer #spec-display-consumer .spec-label {
    font-weight: 600;
    color: var(--cleanh-secondary-color);
    margin-right: 10px;
}

.cleanh-calculator-widget-consumer #spec-display-consumer .spec-value {
    font-weight: 600;
    color: #333;
    margin-left: auto; /* Push value to the right */
    padding-left: 10px; /* Space between label and value if wrapped */
    text-align: right;
}

.cleanh-calculator-widget-consumer #service-controls-consumer {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
}

.cleanh-calculator-widget-consumer #service-controls-consumer select {
    flex: 1;
    min-width: 100px; /* Prevent shrinking too much */
}

.cleanh-calculator-widget-consumer #service-controls-consumer input {
    width: 80px;
    flex-shrink: 0; /* Prevent input from shrinking */
}

/* ▼▼▼ [수정됨] 버튼 스타일 ▼▼▼ */
.cleanh-calculator-widget-consumer #add-service-btn-consumer {
    background-color: var(--cleanh-primary-color) !important; /* 상담 버튼과 동일한 색상, 덮어쓰기 방지 */
    color: white !important; /* 글자색 덮어쓰기 방지 */
    cursor: pointer;
    font-weight: 600;
    text-align: center;
    margin-top: 15px; 
    border: none; 
    /* 상속받는 .form-control 스타일은 그대로 유지 (padding, width, border-radius 등) */
}
/* ▼▼▼ [수정됨] 버튼 Hover 스타일 ▼▼▼ */
.cleanh-calculator-widget-consumer #add-service-btn-consumer:hover {
     background-color: #0d2a4c !important; /* 상담 버튼 hover와 동일한 색상, 덮어쓰기 방지 */
}
/* ▲▲▲ 수정된 부분 끝 ▲▲▲ */


.cleanh-calculator-widget-consumer #services-list-consumer {
    list-style: none;
    padding: 0;
    margin-top: 15px;
    margin-bottom: 0; /* Reset default margin */
}

.cleanh-calculator-widget-consumer #services-list-consumer li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--cleanh-border-color);
    border-radius: 6px;
    margin-bottom: 5px;
    font-size: 15px;
    word-break: break-word; /* Allow long item names to wrap */
}
.cleanh-calculator-widget-consumer #services-list-consumer li span {
    margin-right: 10px; /* Space before remove button */
}

.cleanh-calculator-widget-consumer #services-list-consumer button {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    padding: 3px 8px;
    font-weight: bold;
    margin-left: 10px;
    line-height: 1; /* Ensure button text is centered vertically */
    flex-shrink: 0; /* Prevent button from shrinking */
}
.cleanh-calculator-widget-consumer #services-list-consumer button:hover {
    background: #c82333; /* Darker shade on hover */
}


.cleanh-calculator-widget-consumer .results-col {
    background-color: var(--cleanh-light-bg);
    border-radius: 10px;
    padding: 40px;
    border: 1px solid var(--cleanh-border-color);
    align-self: flex-start; /* Prevent stretching */
}

.cleanh-calculator-widget-consumer .results-col h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--cleanh-primary-color);
    margin-top: 0;
    margin-bottom: 30px;
    text-align: center;
}

.cleanh-calculator-widget-consumer .result-list {
    min-height: 150px; /* Ensure minimum height */
}
/* Placeholder text style */
.cleanh-calculator-widget-consumer .result-list p {
     text-align: center;
     color: #888;
     padding-top: 20px;
     margin: 0;
}

.cleanh-calculator-widget-consumer .result-item {
    display: flex;
    justify-content: space-between;
    font-size: 17px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed var(--cleanh-border-color);
    gap: 10px; /* Add gap between label and value */
}

.cleanh-calculator-widget-consumer .result-item .label {
    color: var(--cleanh-secondary-color);
    flex-basis: 60%; /* Adjust basis as needed */
    word-break: keep-all; /* Prevent breaking Korean words awkwardly */
    text-align: left;
}

.cleanh-calculator-widget-consumer .result-item .value {
    font-weight: 500;
    color: #343a40;
    text-align: right;
    flex-shrink: 0; /* Prevent value from shrinking */
    white-space: nowrap; /* Prevent price from wrapping */
}

.cleanh-calculator-widget-consumer .total-price {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid var(--cleanh-border-color);
    text-align: right;
    display: flex; /* Use flexbox for alignment */
    justify-content: flex-end; /* Align items to the right */
    align-items: baseline; /* Align text baselines */
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

.cleanh-calculator-widget-consumer .total-price .label {
    font-size: 18px;
    font-weight: 600;
    color: #343a40;
    margin-right: 10px; /* Space between label and value */
}

.cleanh-calculator-widget-consumer .total-price .value {
    font-size: 28px;
    font-weight: 700;
    color: var(--cleanh-accent-color);
    /* margin-left removed as flex handles spacing */
}

.cleanh-calculator-widget-consumer .disclaimer {
    font-size: 13px;
    color: #868e96;
    text-align: right;
    margin-top: 10px;
    margin-bottom: 0;
}

.cleanh-calculator-widget-consumer .cta-button {
    display: block;
    width: 100%;
    text-align: center;
    background-color: var(--cleanh-primary-color);
    color: white;
    text-decoration: none;
    padding: 18px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
    margin-top: 30px;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    line-height: 1.5; /* Ensure text fits well */
}

.cleanh-calculator-widget-consumer .cta-button:hover {
    background-color: #0d2a4c; /* Darker blue */
}

/* Disabled button state */
.cleanh-calculator-widget-consumer .cta-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Specific styling for household excess label to override general label style */
#household-excess-container-consumer label {
    font-size: 15px !important; /* Ensure smaller size */
    margin-bottom: 5px !important; /* Reduce margin */
}

/* ========== [신규] 성공 팝업 스타일 ========== */

.qcp-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99998; /* 매우 높게 설정 */
    opacity: 0;
    animation: qcpFadeIn 0.3s forwards;
    box-sizing: border-box; /* 전역 box-sizing 상속 */
}

.qcp-popup-modal {
    background-color: #ffffff;
    padding: 30px 35px; /* 패딩 조정 */
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 99999;
    width: 90%;
    max-width: 450px;
    text-align: center;
    transform: scale(0.9);
    animation: qcpScaleUp 0.3s 0.1s forwards;
    box-sizing: border-box; /* 전역 box-sizing 상속 */
    font-family: 'Pretendard', sans-serif; /* 폰트 적용 */
}

.qcp-popup-message {
    font-size: 17px;
    line-height: 1.6;
    color: #333;
    margin-top: 0;
    margin-bottom: 25px;
    word-break: keep-all; /* 한글 단어 안깨지게 */
}

.qcp-popup-close-btn {
    /* 플러그인의 기본 색상 변수(var)를 사용합니다. */
    background-color: var(--cleanh-primary-color, #1A3A5F); 
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    font-family: 'Pretendard', sans-serif; /* 폰트 적용 */
}

.qcp-popup-close-btn:hover {
    /* 플러그인의 강조 색상 변수(var)를 사용합니다. */
    background-color: var(--cleanh-accent-color, #0d6efd);
}

/* 팝업 애니메이션 */
@keyframes qcpFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes qcpScaleUp {
    from { transform: scale(0.9); opacity: 0.5; }
    to { transform: scale(1); opacity: 1; }
}
/* ========== 팝업 스타일 끝 ========== */