/* Elkateb inclusive builder UX update */

.builder-shell-v4,
.builder-grid-v4,
.builder-form-card,
.builder-preview-card,
.builder-step,
.repeater-block,
.repeater-item,
.profile-type-panel,
.design-panel {
    min-width: 0;
    max-width: 100%;
}

.profile-type-panel {
    padding: 1.25rem;
    margin-bottom: 1.4rem;
    border: 1px solid #e3e8f3;
    border-radius: 1.2rem;
    background: linear-gradient(145deg, #fbfcff, #f6f4ff);
}

.profile-type-heading h4 {
    margin: 0 0 .3rem;
    font-size: 1.05rem;
    line-height: 1.55;
}

.profile-type-heading p,
.inclusive-repeater-title p,
.inclusive-note p {
    margin: 0;
    color: #667085;
    line-height: 1.8;
    font-size: .9rem;
}

.profile-type-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
    margin-top: 1rem;
}

.profile-type-choice {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    grid-template-areas: "icon title" "icon text";
    align-items: center;
    gap: .08rem .75rem;
    width: 100%;
    min-width: 0;
    padding: .9rem;
    text-align: start;
    color: #27324a;
    background: #fff;
    border: 1px solid #dce2ee;
    border-radius: 1rem;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.profile-type-choice:hover {
    transform: translateY(-1px);
    border-color: #a998ff;
}

.profile-type-choice.selected {
    border-color: #6941ff;
    box-shadow: 0 0 0 3px rgba(105, 65, 255, .12);
    background: #faf9ff;
}

.profile-type-choice .material-symbols-rounded {
    grid-area: icon;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #6941ff;
    background: #efeaff;
}

.profile-type-choice strong {
    grid-area: title;
    min-width: 0;
    line-height: 1.45;
}

.profile-type-choice small {
    grid-area: text;
    min-width: 0;
    color: #7a8499;
    line-height: 1.45;
}

.inclusive-note {
    display: flex;
    gap: .8rem;
    align-items: flex-start;
    padding: 1rem 1.1rem;
    margin-bottom: 1.2rem;
    border: 1px solid #cde5ff;
    border-radius: 1rem;
    background: #f4f9ff;
}

.inclusive-note > .material-symbols-rounded {
    flex: 0 0 auto;
    color: #1769aa;
}

.inclusive-note strong {
    display: block;
    margin-bottom: .2rem;
    line-height: 1.5;
}

.inclusive-repeater-title {
    align-items: flex-start !important;
    gap: 1rem;
}

.inclusive-repeater-title > div:first-child {
    min-width: 0;
    flex: 1 1 300px;
}

.inclusive-repeater-title h4 {
    margin-bottom: .2rem;
    line-height: 1.55;
}

.repeater-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .5rem;
    flex: 0 1 auto;
}

.repeater-actions .btn,
.inclusive-repeater-title > .btn {
    white-space: normal;
    line-height: 1.45;
}

.skip-group {
    color: #475467;
}

.repeater-empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    min-height: 82px;
    padding: 1rem;
    text-align: center;
    color: #7a8499;
    border: 1px dashed #d6dce8;
    border-radius: .9rem;
    background: #fbfcfe;
}

.repeater-empty-state p {
    margin: 0;
    line-height: 1.7;
}

.repeater-item-grid > div,
.repeater-item-grid input,
.repeater-item-grid textarea,
.repeater-item-grid select {
    min-width: 0;
    max-width: 100%;
}

.form-text {
    display: block;
    margin-top: .35rem;
    color: #7a8499;
    line-height: 1.7;
}

.inclusive-builder-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
}

.builder-navigation-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: .65rem;
    margin-inline-start: auto;
}

.cancel-builder-button {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

@media (max-width: 767.98px) {
    .profile-type-grid {
        grid-template-columns: 1fr;
    }

    .profile-type-panel,
    .inclusive-note {
        padding: .9rem;
    }

    .inclusive-repeater-title {
        display: flex !important;
        flex-direction: column;
    }

    .repeater-actions,
    .inclusive-repeater-title > .btn {
        width: 100%;
    }

    .repeater-actions .btn,
    .inclusive-repeater-title > .btn {
        flex: 1 1 100%;
        justify-content: center;
    }

    .inclusive-builder-actions,
    .builder-navigation-actions {
        width: 100%;
    }

    .cancel-builder-button {
        width: 100%;
        justify-content: center;
        order: 2;
    }

    .builder-navigation-actions {
        order: 1;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .builder-navigation-actions #submit-resume {
        grid-column: 1 / -1;
    }

    .builder-navigation-actions .btn {
        width: 100%;
        min-width: 0;
        white-space: normal;
        line-height: 1.45;
    }
}

@media (max-width: 420px) {
    .profile-type-choice {
        grid-template-columns: 36px minmax(0, 1fr);
        padding: .75rem;
    }

    .profile-type-choice .material-symbols-rounded {
        width: 36px;
        height: 36px;
    }

    .builder-navigation-actions {
        grid-template-columns: 1fr;
    }

    .builder-navigation-actions #submit-resume {
        grid-column: auto;
    }
}
