﻿.contact-actions {
    display: flex;
    justify-content: flex-end;
    gap: calc(12*var(--vw-base));
    margin: calc(36*var(--vw-base)) 0 calc(2*var(--vw-base)) 0;
}

.contact-captcha-control {
    position: relative;
    flex: 0 0 auto;
}

.contact-actions .consult-submit {
    margin: 0;
    flex-shrink: 0;
}

.contact-actions .contact-captcha-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: calc(8*var(--vw-base));
    font-family: "Noto Sans TC", sans-serif;
    font-size: calc(13*var(--vw-base));
    letter-spacing: .08em;
}

.contact-captcha-box {
    margin-top: calc(2*var(--vw-base));
    width: calc(12*var(--vw-base));
    height: calc(12*var(--vw-base));
    flex-shrink: 0;
    background: url('../img/contact/check.png') center / contain no-repeat;
}

.is-verified .contact-captcha-box {
    background-image: url('../img/contact/checked.png');
}

.contact-captcha-button:hover .contact-captcha-box {
    filter: brightness(0) invert(1);
}

@media (max-width: 767px),
(min-width: 768px) and (max-width: 1399px) and (orientation: portrait) {

    /* The PH captcha button is light; keep its original check artwork dark on
       touch browsers that retain :hover after a tap. */
    .contact-category .contact-captcha-button:hover .contact-captcha-box,
    .contact-category .contact-captcha-button:active .contact-captcha-box,
    .contact-category .contact-captcha-button:focus-visible .contact-captcha-box {
        filter: none;
    }
}

.contact-actions button:disabled {
    cursor: wait;
    opacity: .65;
}

.contact-form-status {
    position: absolute;
    top: auto;
    bottom: calc(100% + 4*var(--vw-base));
    left: 0;
    width: calc(170*var(--vw-base));
    margin: 0;
    color: #4d4d4dbb;
    font: calc(10*var(--vw-base))/1.4 "Noto Sans TC", sans-serif;
    letter-spacing: .04em;
    text-align: left;
}

.contact-form-status:empty {
    display: none;
}

.consult-field>input:-webkit-autofill,
.consult-field>input:-webkit-autofill:hover,
.consult-field>input:-webkit-autofill:focus,
.consult-field>input:-webkit-autofill:active,
.consult-field>input:autofill {
    -webkit-text-fill-color: #4d4d4d;
    caret-color: #4d4d4d;
    -webkit-box-shadow: inset 0 0 0 1000px #ede7de;
    box-shadow: inset 0 0 0 1000px #ede7de;
    transition: background-color 9999s ease-out;
}

#contact-captcha-popup[hidden] {
    display: none;
}

#contact-captcha-popup {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .6);
}

.contact-captcha-dialog {
    position: relative;
    max-width: calc(100vw - 24px);
    box-sizing: border-box;
    padding: 44px 12px 20px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .25);
    color: #444;
}

.contact-captcha-close {
    position: absolute;
    right: 8px;
    top: 4px;
    padding: 4px 8px;
    border: 0;
    background: transparent;
    color: #555;
    font-size: 24px;
    cursor: pointer;
}

.contact-captcha-status {
    max-width: 304px;
    margin: 8px 0 0;
    font: 14px/1.5 sans-serif;
}

.contact-captcha-close:focus-visible {
    outline: 2px solid #4d4d4d;
}

.swal2-popup {
    font-family: "Noto Sans TC", sans-serif;
}

.swal2-html-container p,
.swal2-html-container ol {
    text-align: left;
}

.swal2-html-container ol {
    padding-left: 1.5em;
}
/* Match one desktop input column; both buttons share its available width. */
.contact-actions {
    width: calc((100% - 12 * var(--vw-base)) / 2);
    margin-left: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}
.contact-actions .contact-captcha-control { min-width: 0; }
.contact-actions .consult-submit {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.contact-actions .contact-form-status { width: 100%; }
@media (max-width: 1320px) and (max-aspect-ratio: 3 / 2) {
    .contact-actions { width: 100%; }
}
@media (max-width: 767px),
(min-width: 768px) and (max-width: 1399px) and (orientation: portrait) {
    .contact-category .contact-actions {
        width: 100%;
        align-items: start;
    }
    .contact-category .contact-actions .consult-submit {
        width: 100%;
        height: calc(64 * var(--vw-base));
    }
    .contact-category .contact-actions .contact-form-status { width: 100%; }
}