/* JUVON – mobile & form optimizations */

/* Prevent iOS zoom on input focus */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="file"],
select,
textarea {
    font-size: 16px;
}

/* Touch-friendly controls */
.button,
button,
input[type="submit"],
input[type="button"] {
    min-height: 44px;
}

/* SweetAlert2 on small screens */
@media screen and (max-width: 736px) {
    .swal2-popup {
        width: calc(100% - 2rem) !important;
        max-width: 24rem;
        font-size: 0.95rem;
    }
}

/* Form sections */
@media screen and (max-width: 736px) {
    #wrapper > .main > .inner {
        padding: 1.5rem 1rem;
    }

    #wrapper > .main > header h2 {
        font-size: 1.35rem;
        line-height: 1.3;
    }

    #wrapper > .main .content form .button {
        width: 100%;
        margin-top: 0.5rem;
    }

    #choosePaymentAmount .col-3.col-12-small {
        margin-bottom: 0.5rem;
    }

    #choosePaymentAmount .validatePayment {
        margin-bottom: 0.5rem !important;
    }

    #choosePaymentAmount p {
        margin-bottom: 1.25rem;
        font-size: 0.9rem;
        line-height: 1.5;
    }

    #updateInstance b {
        display: block;
        margin-bottom: 0.75rem;
        line-height: 1.5;
    }

    select#instance {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* Auszahlung */
.payout-required-notice {
    border-color: #c45c26;
    background-color: #fff8f3;
    text-align: left;
}

.payout-required-notice p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.payout-required-notice p:last-child {
    margin-bottom: 0;
}

.payout-required-notice .button {
    width: 100%;
    max-width: 100%;
    white-space: normal;
    line-height: 1.4;
    height: auto;
    padding: 0.85rem 1rem;
}

.payout-upload-label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 700;
    text-align: left;
}

.payout-required {
    color: #c45c26;
}

.payout-upload-hint {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    text-align: left;
    line-height: 1.5;
}

#payout_form {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #eeeeee;
    border-radius: 0.5rem;
    background: #fff;
}

@media screen and (max-width: 736px) {
    #payoutForm .col-6.col-12-xsmall {
        width: 100%;
    }

    #payoutForm ul.actions {
        width: 100%;
    }

    #payoutForm ul.actions li {
        width: 100%;
    }

    #payoutForm input[type="submit"] {
        width: 100%;
    }
}

/* Payment page */
@media screen and (max-width: 736px) {
    #query {
        margin-bottom: 0.5rem;
    }

    #checkCustomer,
    #updateCustomer {
        width: 100%;
    }
}

/* Header: nav + language/menu side by side */
.header-right {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-right: 1rem;
    z-index: 10001;
}

#header.alt .header-right {
    top: 1rem;
    height: auto;
    align-items: flex-start;
}

#header > .header-right > nav,
#header.alt > .header-right > nav {
    position: static;
    top: auto;
    right: auto;
}

.nav-mobile-source {
    display: none !important;
}

#header .nav-desktop > ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#header .nav-desktop > ul > li {
    margin: 0;
    padding: 0;
    list-style: none;
}

#header .nav-deposit-button {
    display: inline-block;
    height: auto;
    line-height: 1.4;
    margin: 0;
    padding: 0.65rem 1.25rem;
    white-space: nowrap;
    font-size: 0.9rem;
}

.header-tools {
    position: static;
    top: auto;
    right: auto;
    z-index: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

#header .header-tools .navPanelToggle {
    position: relative;
    top: auto;
    right: auto;
    display: none;
    height: 44px;
    line-height: 44px;
    min-height: 44px;
    padding: 0 1rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 0.35rem;
    background: rgba(0, 0, 0, 0.25);
    color: #fff;
}

#header.reveal .header-tools .language-switcher-toggle,
#header.reveal .header-tools .navPanelToggle {
    border-color: rgba(31, 74, 109, 0.25);
    background: rgba(31, 74, 109, 0.08);
    color: #1f4a6d;
}

#header .header-tools .navPanelToggle:hover,
#header .header-tools .navPanelToggle:focus {
    background: rgba(0, 0, 0, 0.4);
}

#header.reveal .header-tools .language-switcher-toggle:hover,
#header.reveal .header-tools .language-switcher-toggle:focus,
#header.reveal .header-tools .navPanelToggle:hover,
#header.reveal .header-tools .navPanelToggle:focus {
    background: rgba(31, 74, 109, 0.15);
}

@media screen and (max-width: 980px) {
    #header > .header-right > nav.nav-desktop {
        display: none;
    }

    #header .header-tools .navPanelToggle {
        display: block;
    }
}

.language-switcher {
    position: relative;
    display: inline-block;
}

.language-switcher-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0.5rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 0.35rem;
    background: rgba(0, 0, 0, 0.25);
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
}

.language-switcher-toggle:hover,
.language-switcher-toggle:focus {
    background: rgba(0, 0, 0, 0.4);
}

.language-switcher-current {
    max-width: 12rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.language-switcher-chevron {
    font-size: 0.75rem;
    opacity: 0.85;
}

.language-switcher-menu {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    min-width: 16rem;
    max-width: min(20rem, calc(100vw - 2rem));
    max-height: 70vh;
    overflow-y: auto;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    background: #fff;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15);
    z-index: 10002;
}

.language-switcher-menu-title {
    margin: 0 0 0.5rem;
    padding: 0 0.25rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.language-switcher-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.language-switcher-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 44px;
    padding: 0.6rem 0.75rem;
    border: 0;
    border-radius: 0.35rem;
    background: transparent;
    color: #333;
    font-size: 0.95rem;
    text-align: left;
    cursor: pointer;
}

.language-switcher-option:hover,
.language-switcher-option:focus {
    background: #f2f6f9;
}

.language-switcher-option.is-active {
    background: #e8f1f8;
    font-weight: 700;
    color: #1f4a6d;
}

.language-switcher-check {
    color: #1f4a6d;
    margin-left: 0.75rem;
}

@media screen and (max-width: 736px) {
    .header-right {
        padding-right: 0.5rem;
    }

    #header.alt .header-right {
        top: 0.5rem;
    }

    .language-switcher-current {
        max-width: 6rem;
    }
}

/* RTL adjustments */
body.is-rtl .payout-required-notice,
body.is-rtl .payout-upload-label,
body.is-rtl .payout-upload-hint {
    text-align: right;
}

body.is-rtl .language-switcher-menu {
    right: auto;
    left: 0;
}

body.is-rtl .language-switcher-option {
    text-align: right;
}

body.is-rtl .language-switcher-check {
    margin-left: 0;
    margin-right: 0.75rem;
}

body.is-rtl .header-right {
    right: auto;
    left: 0;
    padding-right: 0;
    padding-left: 1rem;
}

@media screen and (max-width: 736px) {
    body.is-rtl .header-right {
        padding-left: 0.5rem;
    }
}
