/* =========================================================
   RESPONSIVE CAPTCHA
   Desktop + Tablet + Mobile Portrait + Mobile Landscape
   ========================================================= */
.luxury-captcha,
.luxury-captcha * {
    box-sizing: border-box;
}

.luxury-captcha {
    width: 100%;
    max-width: 100%;
    margin: 14px 0 4px;
    overflow: hidden;
}

.luxury-captcha-row {
    width: 100%;
    max-width: 100%;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 9px;
    min-width: 0;
}

.luxury-captcha-question {
    flex: 0 0 190px;
    width: 190px;
    min-width: 0;
    height: 58px;
}

.luxury-captcha-image {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: 58px !important;
    object-fit: fill;
    border: 1px solid #bca05c;
    border-radius: 7px;
    background: #f8f6ef;
}

.luxury-captcha-input {
    flex: 1 1 auto;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100%;
    height: 58px !important;
    margin: 0 !important;
    padding: 0 15px !important;
    border: 1px solid #c8b47b !important;
    border-radius: 7px !important;
    background: #fff !important;
    color: #191f2d !important;
    font-size: 16px !important;
    line-height: normal !important;
    outline: none;
}

.luxury-captcha-input:focus {
    border-color: #9f8138 !important;
    box-shadow: 0 0 0 3px rgba(188, 160, 92, .12) !important;
}

.luxury-captcha-input::placeholder {
    color: #999 !important;
    opacity: 1;
}

.luxury-captcha-refresh {
    flex: 0 0 58px !important;
    width: 58px !important;
    min-width: 58px !important;
    max-width: 58px !important;
    height: 58px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border: 1px solid #bca05c !important;
    border-radius: 7px !important;
    background: #191f2d !important;
    color: #d8bd73 !important;
    font-size: 28px !important;
    font-weight: 400;
    line-height: 1 !important;
    cursor: pointer;
    transition: all .2s ease;
}

.luxury-captcha-refresh:hover {
    background: #262e40 !important;
    border-color: #d8bd73 !important;
    transform: translateY(-1px);
}

.luxury-captcha-refresh:active {
    transform: translateY(0);
}

.luxury-captcha-error {
    width: 100%;
    margin-top: 6px;
    color: #b42318;
    font-size: 13px;
    line-height: 1.3;
    word-break: break-word;
}

/* Tablet */
@media (max-width: 991.98px) {
    .luxury-captcha-row { gap: 8px; }
    .luxury-captcha-question {
        flex-basis: 170px;
        width: 170px;
        height: 54px;
    }
    .luxury-captcha-image { height: 54px !important; }
    .luxury-captcha-input { height: 54px !important; }
    .luxury-captcha-refresh {
        flex-basis: 54px !important;
        width: 54px !important;
        min-width: 54px !important;
        max-width: 54px !important;
        height: 54px !important;
        font-size: 26px !important;
    }
}

/* Mobile portrait */
@media (max-width: 767.98px) {
    .luxury-captcha {
        margin: 10px 0 5px;
    }

    .luxury-captcha-row {
        gap: 7px;
        overflow: visible;
    }

    .luxury-captcha-question {
        /* Never allow the CAPTCHA image to collapse on phones. */
        flex: 0 0 clamp(90px, 30vw, 125px);
        width: clamp(90px, 30vw, 125px);
        height: 50px;
    }

    .luxury-captcha-image {
        width: 100% !important;
        height: 50px !important;
        object-fit: fill;
    }

    .luxury-captcha-input {
        flex: 1 1 0;
        width: 0 !important;
        height: 50px !important;
        padding: 0 10px !important;
        font-size: 16px !important;
    }

    .luxury-captcha-refresh {
        flex: 0 0 50px !important;
        width: 50px !important;
        min-width: 50px !important;
        max-width: 50px !important;
        height: 50px !important;
        font-size: 24px !important;
    }
}

/* Small phones */
@media (max-width: 380px) {
    .luxury-captcha-row { gap: 5px; }

    .luxury-captcha-question {
        flex-basis: clamp(82px, 29vw, 108px);
        width: clamp(82px, 29vw, 108px);
        height: 46px;
    }

    .luxury-captcha-image { height: 46px !important; }
    .luxury-captcha-input {
        height: 46px !important;
        padding: 0 8px !important;
        font-size: 15px !important;
    }
    .luxury-captcha-refresh {
        flex-basis: 46px !important;
        width: 46px !important;
        min-width: 46px !important;
        max-width: 46px !important;
        height: 46px !important;
        font-size: 22px !important;
    }
}

/* Mobile landscape / rotated phone */
@media (max-width: 767.98px) and (orientation: landscape) {
    .luxury-captcha-row { gap: 7px; }
    .luxury-captcha-question {
        flex: 0 0 135px;
        width: 135px;
        height: 44px;
    }
    .luxury-captcha-image { height: 44px !important; }
    .luxury-captcha-input {
        height: 44px !important;
        font-size: 15px !important;
    }
    .luxury-captcha-refresh {
        flex-basis: 44px !important;
        width: 44px !important;
        min-width: 44px !important;
        max-width: 44px !important;
        height: 44px !important;
        font-size: 22px !important;
    }
}

/* Very short landscape screens */
@media (max-width: 767.98px) and (orientation: landscape) and (max-height: 450px) {
    .luxury-captcha-question {
        flex-basis: 120px;
        width: 120px;
        height: 40px;
    }
    .luxury-captcha-image { height: 40px !important; }
    .luxury-captcha-input { height: 40px !important; }
    .luxury-captcha-refresh {
        flex-basis: 40px !important;
        width: 40px !important;
        min-width: 40px !important;
        max-width: 40px !important;
        height: 40px !important;
        font-size: 20px !important;
    }
}

@media (hover: none) and (pointer: coarse) {
    .luxury-captcha-refresh { -webkit-tap-highlight-color: transparent; }
}
