/* ==========================================================================
   Telecom Solution Finder — modal questionnaire
   ========================================================================== */

.sf-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
}

.sf-modal.is-open {
    display: block;
}

body.sf-modal-open {
    overflow: hidden;
}

.sf-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 22, 40, 0.72);
}

.sf-modal__dialog {
    position: relative;
    width: 92%;
    max-width: 560px;
    margin: 6vh auto;
    max-height: 88vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    padding: 32px;
    animation: sf-pop 0.25s ease;
}

@keyframes sf-pop {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.sf-modal__close {
    position: absolute;
    top: 14px;
    right: 16px;
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    color: #6b7280;
    cursor: pointer;
}

.sf-modal__close:hover {
    color: #111;
}

.sf-modal__title {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 700;
    color: #0a1628;
}

.sf-modal__intro {
    margin: 0 0 18px;
    color: #6b7280;
    font-size: 15px;
}

/* ---- progress ---- */

.sf-progress {
    height: 6px;
    border-radius: 6px;
    background: #e6e9ef;
    overflow: hidden;
    margin-bottom: 24px;
}

.sf-progress__bar {
    height: 100%;
    width: 0;
    background: #22A1D8;
    transition: width 0.3s ease;
}

/* ---- steps ---- */

.sf-step__question {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 600;
    color: #0a1628;
}

.sf-step__options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sf-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1.5px solid #e1e5ee;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}
/* ===== Radio & Checkbox — custom ===== */
.sf-option input[type="radio"],
.sf-option input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    border: 2px solid #c4ccd8;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    display: grid;
    place-content: center;
    transition: border-color 0.15s ease;
}
.sf-option input[type="radio"]::before,
.sf-option input[type="checkbox"]::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.12s ease;
    background: #22A1D8;
}
.sf-option input[type="checkbox"]::before {
    border-radius: 2px;
}

/* checkbox ko square shape */
.sf-option input[type="checkbox"] {
    border-radius: 5px;
}
.sf-option:hover {
    border-color: #b9c4e0;
}
.sf-nav button:focus {
    outline: unset;
}
.sf-option input {
    accent-color: #22A1D8;  
    width: 18px;
    height: 18px;
}
.sf-option input:checked::before {
    transform: scale(1);
}
/* select hone par */
.sf-option input:checked {
    border-color: #22A1D8;
}
/* selected label ka color */
.sf-option input:checked ~ .sf-option__label {
    font-weight: 600;
    color: #22A1D8;
}
.sf-option__label {
    font-size: 15px;
    color: #1f2937;
}

.sf-option-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sf-question-text {
    width: calc(100% - 30px);
    margin-left: 30px;
    padding: 12px 14px;
    border: 1.5px solid #e1e5ee;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.5;
    min-height: 84px;
    resize: vertical;
}

.sf-question-text:focus {
    outline: none;
    border-color: #22A1D8;
}

.sf-step__error {
    margin: 12px 0 0;
    color: #d92d20;
    font-size: 13px;
}

/* ---- summary ---- */

.sf-summary {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sf-summary__row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    background: #f5f7fb;
    border-radius: 8px;
}

.sf-summary__q {
    color: #6b7280;
    font-size: 14px;
}

.sf-summary__a {
    color: #0a1628;
    font-weight: 600;
    font-size: 14px;
    text-align: right;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: normal;
}

/* ---- contact fields ---- */

.sf-field {
    margin-bottom: 14px;
}

.sf-field input {
    width: 100%;
    padding: 13px 15px;
    border: 1.5px solid #e1e5ee;
    border-radius: 10px;
    font-size: 15px;
}

.sf-field input:focus {
    outline: none;
    border-color: #22A1D8;
}

.sf-form__message {
    margin: 6px 0 0;
    font-size: 14px;
}

.sf-form__message.is-error {
    color: #d92d20;
}

.sf-form__message.is-success {
    color: #027a48;
}

/* ---- nav ---- */

.sf-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid #eef1f6;
}

.sf-step-count {
    margin-left: auto;
    color: #9aa3b2;
    font-size: 13px;
}

.sf-btn {
    border: 0;
    border-radius: 10px;
    padding: 12px 26px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.sf-btn--next,
.sf-btn--submit {
    background: #22A1D8;
    color: #fff;
}

.sf-btn--next:hover,
.sf-btn--submit:hover {
    background:#197ba5;
}

.sf-btn--prev {
    background: #eef1f6;
    color: #374151;
}

.sf-btn--prev:hover {
    background: #e2e7f0;
}

.sf-btn--submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* When next is hidden (contact step), push the step-count + submit right. */
.sf-btn--next[hidden] + .sf-step-count {
    margin-left: auto;
}

/* ---- thank you page ---- */

.thank-you-wrap {
    text-align: center;
}

.thank-you-card {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 24px;
}

.thank-you-image img {
    max-width: 120px;
    height: auto;
    margin-bottom: 24px;
}

.thank-you-heading {
    font-size: 34px;
    font-weight: 700;
    margin-bottom: 10px;
}

.thank-you-subheading {
    font-size: 18px;
    color: #6b7280;
    margin-bottom: 18px;
}

.thank-you-message {
    color: #4b5563;
    margin-bottom: 28px;
}

@media (max-width: 575px) {
    .sf-modal__dialog { padding: 24px 18px; margin: 4vh auto; }
    .sf-nav { flex-wrap: wrap; }
    .sf-btn { flex: 1; }
}
