/* ==== Form Container ==== */
#ccf-container {
    max-width: 900px;
    margin: 60px auto;
    padding: 40px;
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    font-family: 'Segoe UI', sans-serif;
    color: #fff;
    animation: fadeIn 1s ease;
    position: relative;
    border: 1px solid black;
}

/* ==== Header Styles ==== */
.ccf-header {
    margin-bottom: 25px;
    padding: 5px 5px;
    background-color: #ffffff;
    border-radius: 8px;
    text-align: center;
    border-bottom: 1px solid #D3D3D3 ;
}

.ccf-title {
    color: #5D34BA;
    font-size: 1.3em;
    font-weight: 700;
    margin: 0;
    padding: 0;
}

/* ==== Form Labels (Question Text) ==== */
#ccf-form label {
    font-size: 1.5em;
    font-weight: bold;
    display: block;
    margin-bottom: 15px;
    color: #000000;
    font-family: 'Segoe UI', sans-serif;
}

/* ==== Inputs & Textareas - Standard Style ==== */
#ccf-form input[type="text"],
#ccf-form input[type="email"],
#ccf-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 2px solid #ccc;
    border-radius: 8px;
    font-size: 1.1em;
    background-color: #ffffff;
    color: #000000;
    transition: all 0.3s ease;
    font-family: 'Segoe UI', sans-serif;
}

#ccf-form input::placeholder,
#ccf-form textarea::placeholder {
    color: #aaa;
}

#ccf-form input:focus,
#ccf-form textarea:focus {
    outline: none;
    background-color: #ffffff;
    box-shadow: 0 0 10px #5c5a5e;
}

/* ==== Yes/No Button Styles ==== */
.ccf-option-btn {
    background-color: green;
    color: #ffffff;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 12px 24px;
    font-size: 1.1em;
    min-width: 120px;
    font-family: 'Segoe UI', sans-serif;
}

.ccf-option-btn:hover {
    background-color: #8624f0;
    transform: scale(1.05);
}

/* ==== Checkbox Group Styles ==== */
.ccf-checkbox-group {
    display: grid;
    grid-template-columns: repeat(3, auto);
    gap: 20px;
    margin-bottom: 20px;
}

/* ==== Checkbox Label Style - Different from question style ==== */
.ccf-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em !important;
    font-weight: normal !important;
    color: #444 !important;
    padding: 6px 10px;
    background-color: #f7f7f7;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
    min-height: auto;
    text-align: left;
    justify-content: flex-start;
    font-family: 'Arial', sans-serif !important;
    line-height:1;
}

/* ==== Checkbox Input - Smaller size ==== */
.ccf-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    flex-shrink: 0;
    accent-color: #6F42C1;
}

/* ==== Hover Effect ==== */
.ccf-checkbox-label:hover {
    background-color: #d1cfcf;
}

/* ==== Buttons ==== */
#ccf-form button,
.ccf-option-btn {
    background-color: green;
    color: #ffffff;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 12px 24px;
    font-size: 1em;
    min-width: 120px;
    font-family: 'Segoe UI', sans-serif;
}

#ccf-form .ccf-next-btn {
    background-color: green;
    color: white;
    font-weight: 700;
    font-size: 1.1em;
}

#ccf-form .ccf-prev-btn {
    background-color: #444;
    color: white;
}

/* Skip button */
#ccf-form .ccf-skip-btn {
    background-color: #888;
    color: #fff;
    font-weight: 700;
}
#ccf-form .ccf-skip-btn:hover {
    background-color: #6f6f6f;
}

/* Hover */
#ccf-form button:hover,
.ccf-option-btn:hover {
    background-color: #8624f0;
    transform: scale(1.05);
}

/* Updated button container to center buttons */
#ccf-form .ccf-buttons {
    display: flex;
    justify-content: right!important;
    gap: 12px;
}

/* ==== Thank You Section ==== */
#ccf-thankyou {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 40px 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    animation: fadeIn 0.8s ease;
    margin: 40px auto;
    max-width: 700px;
}

.ccf-thankyou-message {
    font-family: 'Segoe UI', sans-serif;
    font-size: 1.8em;
    font-weight: 900;
    color: #228B22;
    line-height: 1.5;
    margin: 0;
    padding: 0;
    white-space: pre-line;
    text-align: center;
}

/* ==== Progress Bar ==== */
.ccf-progress-bar {
    width: 100%;
    height: 12px;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
}

.ccf-progress-fill {
    height: 100%;
    background-color: #23c22b;
    transition: width 0.4s ease;
}

/* ==== Animation ==== */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

/* ==== Embedded Form Container Fixes ==== */
.ccf-wrapper {
    max-width: 100%;
    width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
    overflow-x: hidden;
}

.ccf-wrapper * {
    max-width: 100% !important;
    box-sizing: border-box;
}

/* Optional: shrink inputs only */
.ccf-wrapper input,
.ccf-wrapper textarea,
.ccf-wrapper button {
    font-size: 1rem !important;
}

/* Prevent full-screen absolute containers from overflowing */
.ccf-wrapper .cf-container,
.ccf-wrapper form {
    width: 100% !important;
    max-width: 100% !important;
    position: relative !important;
    overflow: hidden;
}

/* ==== Initial Question Centering ==== */
.ccf-initial-question {
    text-align: center;
}

.ccf-option-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* ==== Input Focus Styles ==== */
#ccf-form input:focus,
#ccf-form textarea:focus {
    border-color: #6F42C1;
    box-shadow: 0 0 0 2px rgba(111, 66, 193, 0.2);
}

/* ==== Better Spacing for Mobile ==== */
.ccf-question-label {
    margin-bottom: 20px;
}

#ccf-form input,
#ccf-form textarea {
    margin-bottom: 25px;
}

/* ===== NEW TYPE-SPECIFIC STYLES ===== */

/* Radio group */
.ccf-radio-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}
.ccf-radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95em !important;
    font-weight: normal !important;
    color: #3f3f3f !important;
    padding: 10px 12px;
    background-color: #f8f8ff;
    border: 1px solid #cfcfe8;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    font-family: 'Arial', sans-serif !important;
    line-height: 1.2;
}
.ccf-radio-label:hover {
    background-color: #efeffa;
    border-color: #bcbce0;
}
.ccf-radio-label input[type="radio"] {
    width: 16px;
    height: 16px;
    margin: 0;
    flex-shrink: 0;
    accent-color: #6F42C1;
}

/* Select (dropdown) */
.ccf-select-wrap { width: 100%; }
.ccf-select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #ccc;
    border-radius: 8px;
    background: #fff;
    color: #000;
    font-size: 1.05em;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.ccf-select:hover { border-color: #bdbdbd; }
.ccf-select:focus {
    border-color: #6F42C1;
    box-shadow: 0 0 0 2px rgba(111, 66, 193, 0.2);
}

/* Slider */
.ccf-slider-wrap { width: 100%; }
.ccf-slider {
    width: 100%;
    appearance: none;
    height: 6px;
    border-radius: 6px;
    background: linear-gradient(90deg, #c4e6ff, #c4e6ff);
    outline: none;
}
.ccf-slider::-webkit-slider-thumb {
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #c4e6ff;
    box-shadow: 0 0 0 4px rgba(93,52,186,0.15);
    cursor: pointer;
}
.ccf-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #5D34BA;
    border: none;
    box-shadow: 0 0 0 4px rgba(93,52,186,0.15);
    cursor: pointer;
}
.ccf-slider-value {
    margin-top: 10px;
    font-size: 1.05em;
    color: #333;
    font-weight: 600;
}
.ccf-slider-suffix { opacity: 0.8; margin-left: 4px; }
.ccf-slider-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 0.9em;
  color: #555;
  font-weight: 600;
}


/* ==== Responsive Tweaks ==== */
@media (max-width: 768px) {
    #ccf-container {
        padding: 25px;
        margin: 15px;
    }

    .ccf-title {
        font-size: 1.2em;
    }

    #ccf-form label {
        font-size: 1.4em;
        line-height: 1.4;
        margin-bottom: 20px;
    }

    .ccf-question-label {
        margin-bottom: 15px;
    }

    #ccf-form input,
    #ccf-form textarea {
        padding: 12px;
        font-size: 1em;
        margin-bottom: 25px;
    }

    .ccf-checkbox-group {
        grid-template-columns: 1fr 1fr;
    }
    .ccf-radio-group {
        grid-template-columns: 1fr;
    }
    
    .ccf-checkbox-label,
    .ccf-radio-label {
        font-size: 0.85em !important;
    }

    .ccf-thankyou-message {
        font-size: 1.6em;
        line-height: 1.6;
        padding: 0 10px;
    }

    /* Responsive Buttons */
    #ccf-form button,
    .ccf-option-btn {
        padding: 10px 15px;
        font-size: 0.85em;
        min-width: 90px;
    }
    
    #ccf-form .ccf-buttons {
        gap: 8px;
    }
}

@media (max-width: 480px) {
    #ccf-container {
        padding: 20px;
        margin: 10px;
    }

    .ccf-title {
        font-size: 1.1em;
        padding: 10px;
    }

    #ccf-form label {
        font-size: 1.3em;
    }
    
    .ccf-checkbox-group,
    .ccf-radio-group {
        grid-template-columns: 1fr;
    }
    
    .ccf-checkbox-label,
    .ccf-radio-label {
        font-size: 0.8em !important;
    }

    /* Mobile Buttons */
    #ccf-form button {
        padding: 8px 12px;
        font-size: 1em;
        min-width: 0;
        flex: 1;
        max-width: 120px;
        width: 60px;
        height:40px;
    }
    
    #ccf-form .ccf-buttons {
        gap: 6px;
    }
    
    /* Option buttons (Yes/No) */
    .ccf-option-buttons {
        gap: 10px;
    }
    
    .ccf-option-btn {
        margin: 0;
        padding: 8px 12px;
        font-size: 1em;
    }
}

/* ==== Specific Styles for New Client Form Button Only ==== */
div.ccf-reset-container {
    text-align: left;
    margin: 25px 0 0 0;
    padding: 15px 0 0 0;
    border-top: 1px solid #e0e0e0;
}

button.ccf-reset-btn {
    background-color: #ff4444 !important;
    color: white !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 12px 24px !important;
    font-size: 1em !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    font-weight: 700 !important;
    display: inline-block !important;
    min-width: 180px !important;
    text-align: center !important;
}

button.ccf-reset-btn:hover {
    background-color: #cc0000 !important;
    transform: scale(1.02) !important;
    box-shadow: 0 4px 12px rgba(255, 68, 68, 0.3) !important;
}

button.ccf-reset-btn:active {
    transform: scale(0.98) !important;
}

@media (max-width: 768px) {
    div.ccf-reset-container {
        text-align: center;
        margin-top: 20px;
    }
    
    button.ccf-reset-btn {
        padding: 10px 20px !important;
        font-size: 0.9em !important;
        min-width: 160px !important;
        
    }
}

@media (max-width: 480px) {
    button.ccf-reset-btn {
        padding: 8px 8px !important;
        font-size: 0.85em !important;
        min-width: 140px !important;
        width: 100% !important;
        background-color:red !important;
        
    }
}
/* ===== Thank You Popup Overlay ===== */
#ccf-thankyou {
    display: none; /* JS will show it */
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

/* inner dialog */
#ccf-thankyou .ccf-thankyou-inner {
    background: #ffffff;
    color: #222;
    padding: 28px 30px;
    border-radius: 12px;
    max-width: 680px;
    width: 100%;
    box-shadow: 0 12px 40px rgba(0,0,0,0.35);
    text-align: center;
    position: relative;
}

/* heading and message */
.ccf-thankyou-heading {
    font-family: 'Segoe UI', sans-serif;
    font-size: 1.6rem;
    margin: 0 0 10px;
    color: #2b8a2b;
}

.ccf-thankyou-message {
    font-family: 'Segoe UI', sans-serif;
    font-size: 1.05rem;
    margin: 0 0 10px;
    color: #333;
    line-height: 1.4;
}

.ccf-thankyou-sub {
    font-size: 0.92rem;
    color: #666;
    margin-top: 8px;
}

/* close button (top-right) */
.ccf-thankyou-close {
    position: absolute;
    right: 12px;
    top: 10px;
    background: transparent;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    padding: 6px 10px;
}

/* small responsive tweaks */
@media (max-width: 480px) {
    #ccf-thankyou .ccf-thankyou-inner {
        padding: 20px;
    }
    .ccf-thankyou-heading { font-size: 1.25rem; }
    .ccf-thankyou-message { font-size: 1rem; }
}
