/* Contacte des de la fitxa d'empresa (LeadController). Els camps i els botons
   agafen els estils del tema; aquí només hi ha el diàleg i la disposició. */

.ltw-lead-dialog {
    width: min(640px, calc(100% - 32px));
    max-height: calc(100% - 48px);
    padding: 0;
    border: 0;
    border-radius: 16px;
    background: transparent;
    overflow: auto;
}
.ltw-lead-dialog--choice {
    width: min(560px, calc(100% - 32px));
}
.ltw-lead-dialog::backdrop {
    background: rgba(20, 38, 68, .55);
}
.ltw-lead-dialog__box {
    position: relative;
    padding: 28px 24px 24px;
    border-radius: 16px;
    background: #fff;
}
@media (min-width: 768px) {
    .ltw-lead-dialog__box {
        padding: 36px 36px 32px;
    }
}
.ltw-lead-dialog__title {
    margin: 0 40px 8px 0;
    font-size: 1.5rem;
    line-height: 1.25;
}
.ltw-lead-dialog__lead {
    margin: 0 0 20px;
    font-weight: 300;
}
.ltw-lead-dialog__close {
    position: absolute;
    top: 12px;
    right: 12px;
    margin: 0;
}
.ltw-lead-dialog__close button {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #f5f5f5;
    color: #142644;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.ltw-lead-dialog__close button:hover {
    background: #e1e1e1;
}

/* Tria: empresa o Xarxa */
.ltw-lead-choice {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}
.ltw-lead-choice__option {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    padding: 16px 20px;
    border: 1px solid #e1e1e1;
    border-radius: 12px;
    background: #fff;
    color: inherit;
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}
.ltw-lead-choice__option:hover,
.ltw-lead-choice__option:focus-visible {
    border-color: #ff800d;
    box-shadow: 0 0 0 3px rgba(255, 128, 13, .15);
    color: inherit;
}
.ltw-lead-choice__label {
    font-weight: 600;
    font-size: 1.1rem;
    color: #142644;
}
.ltw-lead-choice__hint {
    font-weight: 300;
    font-size: .95rem;
}

/* Formulari */
.ltw-lead-form p {
    margin: 0;
}
.ltw-lead-form__grid {
    display: grid;
    gap: 14px 16px;
}
@media (min-width: 640px) {
    .ltw-lead-form__grid {
        grid-template-columns: 1fr 1fr;
    }
    .ltw-lead-form__field--wide {
        grid-column: 1 / -1;
    }
}
.ltw-lead-form__field label {
    display: block;
    margin-bottom: 4px;
    font-size: .9rem;
    font-weight: 500;
}
/* Els camps del tema són blancs, pensats per a fons grisos: dins la caixa
   blanca del diàleg no es veurien. Prou especificitat per guanyar al selector del tema. */
.ltw-lead-dialog .ltw-lead-form .ltw-lead-form__field input:not([type="checkbox"]),
.ltw-lead-dialog .ltw-lead-form .ltw-lead-form__field textarea {
    width: 100%;
    border-color: #f5f5f5;
    background-color: #f5f5f5;
    transition: border-color .15s, background-color .15s;
}
.ltw-lead-dialog .ltw-lead-form .ltw-lead-form__field input:not([type="checkbox"]):focus,
.ltw-lead-dialog .ltw-lead-form .ltw-lead-form__field textarea:focus {
    border-color: #ff800d;
    background-color: #fff;
    outline: none;
}
.ltw-lead-dialog .ltw-lead-form .ltw-lead-form__field textarea {
    height: auto;
    min-height: 120px;
    resize: vertical;
}
.ltw-lead-dialog .ltw-lead-form .is-invalid input:not([type="checkbox"]),
.ltw-lead-dialog .ltw-lead-form .is-invalid textarea {
    border-color: #c62828;
}
.ltw-lead-form__msg {
    display: block;
    margin-top: 4px;
    font-size: .85rem;
    color: #c62828;
}
.ltw-lead-form__trap {
    position: absolute !important;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.ltw-lead-form__consent {
    margin-top: 16px !important;
    font-size: .9rem;
    font-weight: 300;
}
.ltw-lead-form__consent label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
}
.ltw-lead-form__consent input {
    margin-top: 3px;
    flex-shrink: 0;
}
.ltw-lead-form__consent a {
    text-decoration: underline;
}
.ltw-lead-form__error {
    margin-top: 12px !important;
    padding: 10px 14px;
    border-radius: 8px;
    background: #fdecea;
    color: #c62828;
    font-size: .95rem;
}
.ltw-lead-form__actions {
    margin-top: 20px !important;
}
.ltw-lead-form__actions button[disabled] {
    opacity: .6;
    cursor: wait;
}
