/***************************************************************
## Stokey Sites Build Form
***************************************************************/

/*
 * Reset any page-builder / block wrapper directly containing the form.
 * Some builders (Gutenberg Group/Cover, Elementor, Divi) apply a
 * background colour and/or a fixed height + overflow:hidden to their
 * wrapper element, which both tints and clips the form. Neutralising
 * that here keeps the fix inside the plugin instead of the theme.
 */
.wp-block-group:has(> .ssbf-build-form),
.wp-block-cover:has(> .ssbf-build-form),
.elementor-widget-container:has(> .ssbf-build-form),
.elementor-element:has(> .ssbf-build-form),
.et_pb_module:has(> .ssbf-build-form) {
    background: none !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

.ssbf-build-form,
.ssbf-build-form *,
.ssbf-build-form *::before,
.ssbf-build-form *::after {
    box-sizing: border-box;
}

.ssbf-build-form {
    background: #ffffff;
    color: #000000;
    margin: 50px auto;
    /*padding: 40px;*/
    max-width: 640px;
    width: 100%;
    height: auto;
    max-height: none;
    overflow: visible;
    border-radius: 12px;
    /*border: 1px solid #eaebed;*/
}

.ssbf-build-form p,
.ssbf-build-form legend,
.ssbf-build-form h2,
.ssbf-build-form h3,
.ssbf-build-form label {
    color: #000000 !important;
}

.ssbf-intro h2 {
    font-size: 1.3rem;
    font-weight: bold;
    margin: 0 0 15px;
}

.ssbf-build-form .form-group {
    margin-bottom: 15px;
}

.ssbf-build-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.ssbf-build-form .ssbf-optional {
    font-weight: normal;
    color: #666;
}

.ssbf-build-form .ssbf-hint {
    font-size: 0.85rem;
    color: #666 !important;
    margin: 0 0 8px;
    font-weight: normal;
}

.ssbf-build-form select {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ccc;
    padding: 10px;
    font-size: 1rem;
    background: #fff;
    color: #000;
}

.ssbf-build-form input[type="text"],
.ssbf-build-form input[type="email"],
.ssbf-build-form input[type="tel"],
.ssbf-build-form textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ccc;
    padding: 10px;
    font-size: 1rem;
}

.ssbf-build-form textarea {
    resize: none;
}

.ssbf-intro {
    margin-bottom: 25px;
}

.ssbf-intro p:last-child {
    margin-bottom: 0;
}

/* Progress bar */
.ssbf-progress {
    margin-bottom: 30px;
}

.ssbf-progress-bar {
    background: #eaebed;
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
}

.ssbf-progress-fill {
    background: #000;
    height: 100%;
    width: 8.33%;
    transition: width 0.2s ease;
}

.ssbf-progress-label {
    margin-top: 8px;
    font-size: 1rem;
    color: #000;
}

/* Steps */
.ssbf-step {
    display: none;
    border: none;
    padding: 0;
    margin: 0;
}

.ssbf-step.active {
    display: block;
}

.ssbf-step legend {
    /*font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 15px;
    padding: 0;*/

    font-size: 2.3rem;
    font-weight: bold;
    margin-bottom: 15px;
    padding: 0;
    color: #000000 !important;

}

.ssbf-step-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.ssbf-step-actions-single {
    justify-content: flex-end;
}

.ssbf-step-actions .ssbf-back {
    background: transparent;
    border: 1px solid #ccc;
    color: #333;
}

/* Checkbox / radio groups */
.ssbf-checkbox-group,
.ssbf-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.ssbf-checkbox-group label,
.ssbf-radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    margin-bottom: 0;
}

.ssbf-checkbox-group input,
.ssbf-radio-group input {
    width: auto;
}

.ssbf-other-field {
    margin-top: 8px;
}

/* Services repeater */
.ssbf-service-row {
    border: 1px solid #eaebed;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    position: relative;
}

.ssbf-remove-service {
    background: transparent;
    border: none;
    color: #b00;
    cursor: pointer;
    padding: 0;
    font-size: 0.85rem;
    text-decoration: underline;
}

.ssbf-add-service {
    background: transparent;
    border: 1px dashed #999;
    color: #333;
    padding: 10px 15px;
    cursor: pointer;
    width: 100%;
}

/* Buttons */
.ssbf-build-form button,
.ssbf-build-form input[type="submit"] {
    /*cursor: pointer;
    font-size: 1rem;
    padding: 12px 24px;
    border: 1px solid #000;
    background: #000;
    color: #fff;
    border-radius: 4px;
*/
    border: none;
    border-radius: 8px;
    color: #FFFFFF;
    background-color: #5B4FE8;
    padding-top: 16px;
    padding-right: 36px;
    padding-bottom: 16px;
    padding-left: 36px;
    font-size: 1rem;
    font-weight: 700;

}

.ssbf-build-form-submit {
    background: var(--ssbf-btn-color, #000000);
    border-color: var(--ssbf-btn-color, #000000);
}

.ssbf-build-form-submit:hover {
    opacity: 0.9;
}

/* Review / summary step */
.ssbf-summary-section {
    border-bottom: 1px solid #eaebed;
    padding: 15px 0;
}

.ssbf-summary-section:first-child {
    padding-top: 0;
}

.ssbf-summary-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 8px;
}

.ssbf-summary-section-header h3 {
    font-size: 1rem;
    font-weight: bold;
    margin: 0;
}

.ssbf-edit-answer {
    background: transparent;
    border: 1px solid #ccc;
    color: #333;
    padding: 4px 12px;
    font-size: 0.85rem;
}

.ssbf-summary-section dl {
    margin: 0;
}

.ssbf-summary-section dt {
    font-weight: bold;
    margin-top: 8px;
    color: #000 !important;
}

.ssbf-summary-section dt:first-child {
    margin-top: 0;
}

.ssbf-summary-section dd {
    margin: 2px 0 0;
    color: #333 !important;
    white-space: pre-wrap;
    word-break: break-word;
}

.ssbf-summary-missing {
    color: #666 !important;
    font-style: italic;
}

.ssbf-summary-empty {
    color: #666;
    font-style: italic;
    margin: 0;
}

.ssbf-success-message {
    background: #f5f5f5;
    color: #000;
    border-left: 4px solid #000;
    padding: 20px 25px;
    margin-bottom: 30px;
}

.ssbf-error-message {
    background: #f5f5f5;
    color: #000;
    border-left: 4px solid #b00020;
    padding: 20px 25px;
    margin-bottom: 30px;
}

.page-title-section {
    display: none;
}

.ssbf-build-form label {
    /*font-size: 1.3rem;*/
    color: #616161 !important;
}