
/* =========================================
   CASA DO MORCEGO
   FORMULARIO DE CONTACTO Y RESERVAS
   ========================================= */

.mg-contact {
    --mg-green: #344538;
    --mg-green-light: #526653;
    --mg-background: #f5f5f1;
    --mg-border: #dfe2da;
    --mg-text: #414940;

    width: 100%;
    max-width: 100%;
    margin: 30px auto;
    color: var(--mg-text);
    font-family: inherit;
}

/* FORMULARIO */

.mg-contact-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 25px 30px;
    padding: 38px;
    background: var(--mg-background);
    border: 1px solid #e9eae4;
    border-radius: 5px;
}

/* CAMPOS */

.mg-contact-field {
    display: flex;
    flex-direction: column;
    gap: 9px;
    min-width: 0;
}

.mg-contact-field label {
    color: var(--mg-green);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
}

.mg-contact-field input,
.mg-contact-field select,
.mg-contact-field textarea {
    display: block;
    width: 100%;
    min-height: 49px;
    padding: 12px 15px;
    border: 1px solid #d6d9d2;
    border-radius: 3px;
    background: #fff;
    color: var(--mg-green);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    box-sizing: border-box;
    box-shadow: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.mg-contact-field textarea {
    min-height: 145px;
    resize: vertical;
}

.mg-contact-field input::placeholder,
.mg-contact-field textarea::placeholder {
    color: #9a9e96;
}

.mg-contact-field input:focus,
.mg-contact-field select:focus,
.mg-contact-field textarea:focus {
    outline: none;
    border-color: var(--mg-green);
    box-shadow: 0 0 0 2px rgba(52, 69, 56, 0.09);
}

/* SECCIÓN DE RESERVA */

.mg-contact-reservation {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 30px;
    padding: 30px;
    background: #fff;
    border: 1px solid var(--mg-border);
    border-left: 3px solid var(--mg-green);
    border-radius: 3px;
}

.mg-contact-reservation[hidden] {
    display: none !important;
}

/* MENSAJE */

.mg-contact-form > .mg-contact-field:nth-of-type(6) {
    grid-column: 1 / -1;
}

/* AVISO DE CAMPOS */

.mg-contact-required {
    grid-column: 1 / -1;
    margin: 0;
    color: #777f75;
    font-size: 12px;
    line-height: 1.5;
}

/* BOTÓN */

.mg-contact .mg-contact-submit button,
.mg-contact .mg-contact-submit button:focus {
    display: inline-block;
    min-width: 210px;
    min-height: 49px;
    padding: 12px 28px;
    border: 1px solid var(--mg-green) !important;
    border-radius: 3px;
    background: var(--mg-green) !important;
    color: #fff !important;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: none !important;
    transition: all 0.25s ease;
}

.mg-contact .mg-contact-submit button:hover {
    background: #fff !important;
    color: var(--mg-green) !important;
    border-color: var(--mg-green) !important;
}

/* MENSAJES DE RESULTADO */

.mg-contact-success,
.mg-contact-error {
    margin-bottom: 28px;
    padding: 18px 22px;
    border-radius: 3px;
    font-size: 14px;
    line-height: 1.7;
}

.mg-contact-success {
    background: #f1f5ef;
    border: 1px solid #d5dfd1;
    color: var(--mg-green);
}

.mg-contact-error {
    background: #faf1ef;
    border: 1px solid #e3c8c3;
    color: #8a4035;
}

/* ANTISPAM */

.mg-contact-trap {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* TABLET */

@media (max-width: 1024px) {
    .mg-contact-form {
        gap: 22px;
        padding: 28px;
    }

    .mg-contact-reservation {
        gap: 22px;
        padding: 25px;
    }
}

/* MÓVIL */

@media (max-width: 600px) {
    .mg-contact {
        margin: 20px auto;
    }

    .mg-contact-form {
        grid-template-columns: 1fr;
        gap: 19px;
        padding: 20px 16px;
    }

    .mg-contact-reservation {
        grid-template-columns: 1fr;
        gap: 19px;
        padding: 20px 16px;
    }

    .mg-contact-form > .mg-contact-field,
    .mg-contact-required,
    .mg-contact-submit {
        grid-column: 1 / -1;
    }

    .mg-contact .mg-contact-submit button,
    .mg-contact .mg-contact-submit button:focus {
        width: 100%;
    }
}


/* =========================================
   MODAL DE CONFIRMACIÓN
   CASA DO MORCEGO
   ========================================= */

.mg-contact-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(27, 37, 29, 0.68);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: mg-modal-fade 0.3s ease both;
}

.mg-contact-modal-content {
    position: relative;
    width: 100%;
    max-width: 490px;
    padding: 52px 42px 42px;
    background: #fbfbf8;
    border: 1px solid #e5e7df;
    border-radius: 5px;
    text-align: center;
    box-shadow: 0 20px 65px rgba(0, 0, 0, 0.22);
    animation: mg-modal-appear 0.35s ease both;
}

.mg-contact-modal-close {
    position: absolute;
    top: 13px;
    right: 17px;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0 !important;
    background: transparent !important;
    color: #687267 !important;
    font-family: inherit;
    font-size: 29px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    box-shadow: none !important;
}

.mg-contact-modal-close:hover {
    color: #344538 !important;
}

.mg-contact-modal-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 66px;
    height: 66px;
    margin: 0 auto 25px;
    border: 1px solid #cbd5c6;
    border-radius: 50%;
    background: #eef2eb;
    color: #344538;
    font-size: 29px;
    font-weight: 400;
}

.mg-contact-modal-eyebrow {
    margin: 0 0 13px;
    color: #778272;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 3px;
}

.mg-contact-modal-content h2 {
    margin: 0 0 20px;
    color: #344538;
    font-family: inherit;
    font-size: 27px;
    font-weight: 500;
    line-height: 1.3;
}

.mg-contact-modal-message {
    margin: 0 auto 19px;
    max-width: 370px;
    color: #596158;
    font-size: 15px;
    line-height: 1.8;
}

.mg-contact-modal-note {
    margin: 0 auto 28px;
    padding-top: 19px;
    border-top: 1px solid #e5e7df;
    color: #7b8278;
    font-size: 12px;
    line-height: 1.7;
}

.mg-contact .mg-contact-modal-button {
    min-width: 155px;
    min-height: 46px;
    padding: 11px 28px;
    border: 1px solid #344538 !important;
    border-radius: 3px;
    background: #344538 !important;
    color: #fff !important;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.mg-contact .mg-contact-modal-button:hover {
    background: #fff !important;
    color: #344538 !important;
}

@keyframes mg-modal-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes mg-modal-appear {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* RESPONSIVE MÓVIL */

@media (max-width: 600px) {

    .mg-contact-modal {
        padding: 16px;
    }

    .mg-contact-modal-content {
        max-width: 100%;
        padding: 48px 23px 28px;
    }

    .mg-contact-modal-icon {
        width: 58px;
        height: 58px;
        margin-bottom: 21px;
        font-size: 25px;
    }

    .mg-contact-modal-content h2 {
        font-size: 23px;
    }

    .mg-contact-modal-message {
        font-size: 14px;
    }

    .mg-contact-modal-note {
        font-size: 12px;
    }

    .mg-contact .mg-contact-modal-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mg-contact-modal,
    .mg-contact-modal-content {
        animation: none;
    }
}
