/*
 * Kontaktní formulář v patičce. Doplňuje main.css, drží se jeho barev:
 * tmavě modrá patička #2a4756, červený akcent #eb5e57, tlačítko jako .Button.
 *
 * Formulář sedí v gridu patičky na místě, kde dřív byla mapa (grid-area: map).
 */

.Footer-form {
    grid-area: map;
}

/* s formulářem je pravý sloupec vyšší než kontakty, proto zarovnat k hornímu okraji */
@media screen and (min-width: 48em) {
    .Footer-inner {
        align-items: start;
    }
}

/* odkaz na Google Mapy pod adresou (dřív tady byla vložená mapa) */
.Footer-mapLink {
    color: hsla(0, 0%, 100%, .7);
    font-size: 1.4rem;
    text-decoration: underline;
}

.Footer-mapLink:hover {
    color: #fff;
}

@media screen and (max-width: 47.9375em) {
    .Footer-form {
        margin-top: 30px;
    }
}

.ContactForm {
    display: flex;
    flex-flow: column;
    gap: 15px;
}

.ContactForm-title {
    display: block;
    font-weight: 700;
}

.ContactForm-fields {
    display: grid;
    gap: 12px;
}

@media screen and (min-width: 48em) {
    .ContactForm-fields {
        grid-template-columns: 1fr 1fr;
    }

    .ContactForm-field--wide {
        grid-column: 1 / -1;
    }
}

.ContactForm-field {
    display: flex;
    flex-flow: column;
    gap: 5px;
}

.ContactForm-label {
    color: hsla(0, 0%, 100%, .7);
    font-size: 1.3rem;
}

.ContactForm-label abbr {
    color: #eb5e57;
    border: none;
    text-decoration: none;
    cursor: help;
}

.ContactForm-input,
.ContactForm-textarea {
    background: hsla(0, 0%, 100%, .08);
    border: 1px solid hsla(0, 0%, 100%, .35);
    border-radius: 2px;
    color: #fff;
    font-family: inherit;
    font-size: 1.6rem;
    padding: 12px 14px;
    width: 100%;
}

.ContactForm-textarea {
    min-height: 110px;
    resize: vertical;
}

.ContactForm-input:hover,
.ContactForm-textarea:hover {
    border-color: hsla(0, 0%, 100%, .6);
}

.ContactForm-input:focus,
.ContactForm-textarea:focus {
    border-color: #eb5e57;
    outline: 2px solid hsla(4, 79%, 63%, .35);
    outline-offset: 0;
}

/* chybu ukazovat teprve až návštěvník pole opustí nebo zkusí odeslat */
.ContactForm-input:not(:placeholder-shown):invalid,
.ContactForm-textarea:not(:placeholder-shown):invalid {
    border-color: #eb5e57;
}

.ContactForm-submit {
    align-self: flex-start;
    background: none;
}

.ContactForm-submit[disabled] {
    cursor: progress;
    opacity: .6;
}

.ContactForm-note {
    color: hsla(0, 0%, 100%, .6);
    font-size: 1.2rem;
    line-height: 1.5;
    margin: 0;
}

.ContactForm-note a {
    color: inherit;
    text-decoration: underline;
}

.ContactForm-note a:hover {
    color: #fff;
}

.ContactForm-status {
    background: hsla(0, 0%, 100%, .1);
    border-left: 3px solid #fff;
    font-size: 1.5rem;
    line-height: 1.5;
    margin: 0;
    padding: 12px 14px;
}

.ContactForm-status.is-error {
    border-left-color: #eb5e57;
}

/* po odeslání zůstane na místě formuláře jen potvrzení */
.ContactForm.is-sent .ContactForm-fields,
.ContactForm.is-sent .ContactForm-submit,
.ContactForm.is-sent .ContactForm-note {
    display: none;
}

/*
 * Past na roboty: pole je mimo obrazovku, takže ho člověk nevidí ani do něj
 * nepřejde tabulátorem, ale robot, který vyplňuje všechno, do něj něco napíše.
 */
.ContactForm-trap {
    height: 0;
    left: -9999px;
    overflow: hidden;
    position: absolute;
    width: 0;
}

/* Odkaz na druhý web firmy. Sedí pod kontakty ve stejném sloupci patičky,
   proto patří k tomuhle souboru – ten už sloupce patičky řeší. */
.Footer-sister {
    color: hsla(0, 0%, 100%, .7);
    font-size: 1.5rem;
    line-height: 1.5;
    margin-top: 25px;
}

.Footer-sister a {
    color: #fff;
    font-weight: 700;
}

.Footer-sister a:hover {
    color: #eb5e57;
}
