/* Container added for some pages – by Taqi on 24/4/26 */
.cost-calc-container {
    width: 100%;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05),
                0 2px 4px -1px rgba(0, 0, 0, 0.03);
    font-family: sans-serif;
    color: #1F2937;
}

/* --- VALIDATION STYLES --- */
.ic-cc-error-msg {
    display: none;
    color: #dc2626;
    font-size: 0.9em;
    margin-top: 5px;
    font-weight: 500;
    text-align: left;
}

.ic-cc-input-error {
    border-color: #dc2626;
    background-color: #fef2f2;
}

/* --- EXISTING STYLES WITH UPDATES --- */
.ic-cc-outer-container {
    max-width: 760px;
    margin: 30px auto 30px;
    text-align: center;
}
.ic-cc-main-title {
    font-size: 2.2em;
    margin: 0 0 10px;
    font-weight: 700;
}
.ic-cc-intro-text {
    font-size: 1.15em;
    color: #64748b;
}

/* Progress Bar */
.ic-cc-progress-bar {
    height: 10px;        
    background: #f1f5f9;
    border-radius: 5px;
    margin-bottom: 8px;
    overflow: hidden;    
}

.ic-cc-progress {
    height: 100%;        
    width: 0;                      
    background: #024430;
    border-radius: 5px;
    transition: width 0.4s ease;
}

.ic-cc-step-indicator {
    display: flex;       
    align-items: center;
    justify-content: flex-start;
    font-size: 1rem;     
    font-weight: 800;    
    color: #3f955f;      
    margin-bottom: 0px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 5px;
}

.ic-cc-current-step {
    color: #52d171;
    font-weight: 800;
    margin: 0 4px;
}

.ic-cc-complete-percent {
    margin-left: auto;
    font-size: 0.85em;  
    color: #024430;      
    background: #eff6ff;            
    padding: 6px 14px;
    border-radius: 20px;            
    font-weight: 600;
}

.ic-cc-question-title {
    font-size: 18px;
    color: #0f172a;
    margin: 10px 0;
    line-height: 1.3;
}
.ic-cc-question-subtitle, .ic-cc-subquestion-title {
    color: #64748b;
    font-size: 1.1em;
    margin: 0 0 25px;
    font-weight: 400;
}

/* ========================================= */
/* DYNAMIC FLEXBOX FOR STEP 9 (Replaces Table)*/
/* ========================================= */
.ic-cc-step[data-step="9"] {
    display: flex;
    flex-direction: column;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
}

/* Flex Row for Desktop */
.ic-cc-step[data-step="9"] .ic-cc-subquestion {
    display: flex;
    flex-wrap: wrap; /* Allows error message to drop below */
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 15px 10px;
    border-bottom: 1px solid #e2e8f0;
}

/* Forces the error message to always take a full new line */
.step-error-text {
    width: 100%;
    flex: 0 0 100%;
    margin-top: 10px !important;
}

/* Let the title stretch flexibly */
.ic-cc-step[data-step="9"] .ic-cc-subquestion-title {
    flex: 1 1 50%;
    margin: 0; 
    padding-right: 20px;
    font-weight: 600;
    color: #334155;
    font-size: 18px;
}

/* Limit PC broadness */
.ic-cc-step[data-step="9"] .ic-cc-options {
    flex: 0 1 380px; 
    margin: 0;
    padding: 0;
    border-bottom: none;
}

/* Alternate row background */
.ic-cc-step[data-step="9"] .ic-cc-subquestion:nth-child(even) {
    background: #f1f5f9;
}
/* ========================================= */

.ic-cc-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    align-items: center;
    text-align: center;
}

.ic-cc-options .ic-cc-label, .ic-cc-table-grid .ic-cc-label {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    text-align: left;
    width: auto;
    min-height: 0px;
    height: auto;
    margin: 0;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #334155;
    font-weight: 500;
    word-break: normal;
    word-wrap: normal;
    white-space: normal;
    line-height: 1.4;
    gap: 10px;
    font-size: 0.95em;
    padding: 5px;
}

.ic-cc-options .ic-cc-label:hover, .ic-cc-table-grid .ic-cc-label:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.ic-cc-options .ic-cc-label:has(input:checked), .ic-cc-table-grid .ic-cc-label:has(input:checked) {
    border-color: #3f955f;
    background: #eff6ff;
    color: #3f955f;
}

.ic-cc-options input[type="checkbox"],
.ic-cc-options input[type="radio"],
.ic-cc-label input[type="radio"] {
    margin: 0;
    transform: scale(1.2);
    accent-color: #3F955F;
    min-width: 18px;
    width: unset;
}

.ic-cc-options.ic-cc-other-label {
    grid-column: unset;
    flex-wrap: wrap;
    padding-top: 5px;
    padding-bottom: 5px;
}

.ic-cc-other-input {
    display: none;
    flex: 1;
    margin-left: 0;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.95em;
    outline: none;
    min-width: 200px;
    height: auto;
}

.ic-cc-options .ic-cc-label:has(input:checked) .ic-cc-other-input {
    display: block;
}

/* ----------------------------------------- */
/* Global "No Requirements / No" Option CSS  */
/* ----------------------------------------- */
.ic-cc-no-requirements-label {
    grid-column: unset;
    border-color: #cbd5e1;
    background: #f8fafc;
    font-weight: 600;
    margin-bottom: 10px;
}

.ic-cc-label.ic-cc-no-requirements-label:has(input:checked) {
    background: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
}

.ic-cc-no-requirements-label input {
    accent-color: #ef4444;
}

.ic-cc-no-requirements-label input:checked {
    accent-color: #ef4444;
}

/* ----------------------------------------- */
/* Global "Not Sure / Unsure / Other" CSS    */
/* ----------------------------------------- */
.ic-cc-unsure-label {
    grid-column: unset;
    border-color: #cbd5e1;
    background: #f8fafc;
    font-weight: 600;
    margin-bottom: 10px;
}

.ic-cc-label.ic-cc-unsure-label:has(input:checked) {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

.ic-cc-unsure-label input {
    accent-color: #d97706;
    background-color: white;
}

.ic-cc-unsure-label input:checked {
    accent-color: #d97706;
}

.ic-cc-contact-fields {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}
.ic-cc-input-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}
.ic-cc-input-label {
    display: block;
    font-weight: 600;
    color: #475569;
    font-size: 0.9em;
    text-align: left;
    margin-bottom: 6px;
    word-break: normal;
    white-space: normal;
}

/* --- INPUT PADDING FIX --- */
.ic-cc-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1em;
    transition: border 0.2s;
    box-sizing: border-box;
}

.ic-cc-input:not(#ic-cc-phone) {
    padding: 5px 12px;
}

.ic-cc-input:focus {
    border-color: #2563eb;
    outline: none;
}
#ic-cc-phone {
    padding-top: 10px;
    padding-bottom: 10px;
}

/* Intl-Tel-Input overrides */
.iti { width: 100%; }
.iti__flag { background-image: url("https://cdn.jsdelivr.net/npm/intl-tel-input@18.2.1/build/img/flags.png"); }
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .iti__flag { background-image: url("https://cdn.jsdelivr.net/npm/intl-tel-input@18.2.1/build/img/flags@2x.png"); }
}

.ic-cc-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 0px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}
.ic-cc-buttons button {
    padding: 14px 36px;
    font-size: 1em;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}
#ic-cc-back {
    background: #f1f5f9;
    color: #64748b;
}
#ic-cc-back:hover:not(:disabled) {
    background: #e2e8f0;
    color: #334155;
}
#ic-cc-next {
    background: #3f955f;
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}
#ic-cc-next:hover {
    background: #3f955f;
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(37, 99, 235, 0.3);
}
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.ic-cc-multiselect{
    width:100%;
    min-height:120px;
    padding:10px;
    border:1px solid #cbd5e1;
    border-radius:8px;
    font-size:14px;
    background:#fff;
}

.ic-cc-multiselect option{
    padding:8px;
}

.ic-cc-other-input{
    margin:5px;
    width:100%;
    padding:10px;
    border:1px solid #cbd5e1;
    border-radius:8px;
}

.multi-select {
    width: 320px;
    position: relative;
    font-family: 'Segoe UI', sans-serif;
}

.select-box {
    border: 1px solid #dcdcdc;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    background: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 42px;
    transition: all 0.2s ease;
}

.select-box:hover {
    border-color: #2e7d32;
}

.arrow {
    font-size: 12px;
    color: #666;
}

.dropdown {
    display: none;
    position: absolute;
    width: 100%;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    background: #fff;
    max-height: 220px;
    overflow-y: auto;
    margin-top: 6px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    z-index: 999;
    padding: 6px 0;
}

.dropdown::-webkit-scrollbar {
    width: 6px;
}
.dropdown::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.dropdown label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.dropdown label:hover {
    background: #f5f7f9;
}

.dropdown input[type="checkbox"] {
    accent-color: #2e7d32;
    cursor: pointer;
}

.show {
    display: block;
}

.multi-select input {
    width: unset;
}

.error-placeholder::placeholder {
    color: red;
    opacity: 1;
}

.ic-cc-table-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    align-items: stretch;
    text-align: center;
}

/* --- MOBILE RESPONSIVENESS OVERRIDE --- */
@media (max-width: 600px) {
    .ic-cc-options {
        grid-template-columns: 1fr;
    }
    .ic-cc-table-grid {
        grid-template-columns: 1fr;
    }
    
    /* OVERRIDE FOR STEP 9 MOBILE ONLY: Custom 2x1 Grid layout */
    .ic-cc-step[data-step="9"] .ic-cc-subquestion {
        flex-direction: column;
        align-items: flex-start;
    }
    .ic-cc-step[data-step="9"] .ic-cc-subquestion-title {
        width: 100%;
        padding-right: 0;
        margin-bottom: 12px;
    }
    .ic-cc-step[data-step="9"] .ic-cc-options {
        width: 100%;
        flex: unset; /* Removes the 380px constraint from desktop on mobile*/
    }
    .ic-cc-step[data-step="9"] .ic-cc-table-grid {
        grid-template-columns: 1fr 1fr; /* Yes and No side-by-side (50% each) */
        gap: 8px; 
    }
    /* Makes the 3rd label (Not Sure) drop down and take 100% width */
    .ic-cc-step[data-step="9"] .ic-cc-table-grid .ic-cc-label:nth-child(3) {
        grid-column: span 2;
    }
    .ic-cc-step[data-step="9"] .ic-cc-label {
        padding: 0 12px; 
        font-size: 0.95em;
        justify-content: flex-start; 
        margin-bottom: 0;
        height: 40px; /* Locks the height so they can't get too big */
        max-height: 40px;
    }
    /* ----------------------------------------------------- */

    .ic-cc-contact-fields {
        grid-template-columns: 1fr;
    }
    .ic-cc-main-title {
        font-size: 1.8em;
    }
}