/**
 * Tomobile Store — the guichet window (login/signup modal).
 *
 * Every selector below is prefixed .tmbg- (matching the markup's id/class
 * prefix in class-tmb-guichet.php). No bare element-type selector (input[],
 * button, etc.) appears anywhere in this file — the earlier /join form used
 * exactly that shortcut and it is harmless there only because /join renders
 * a whole standalone page with no theme around it. This stylesheet loads on
 * top of the live storefront theme, so an unscoped `input{...}` rule would
 * repaint every Flatsome/WooCommerce input on the page behind the dialog.
 */

.tmbg-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(20, 22, 26, .55);
    /* Above Flatsome's sticky header/menu and its own login lightbox. */
    z-index: 100000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 14px;
    overflow-y: auto;
}
.tmbg-backdrop[hidden] { display: none !important; }

.tmbg-dialog {
    background: #fff;
    color: #1a1a1a;
    width: 100%;
    max-width: 400px;
    border-radius: 10px;
    box-shadow: 0 12px 30px -8px rgba(0, 0, 0, .42);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow: hidden;
}
.tmbg-dialog:focus { outline: none; }

.tmbg-ctop {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 14px 0;
}
.tmbg-brand { font-weight: 900; font-size: 14px; color: #1a1a1a; }
.tmbg-brand-dot { color: #f99d27; }
.tmbg-close {
    background: none;
    border: 0;
    color: #b0b0b0;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
}
.tmbg-close:hover, .tmbg-close:focus { color: #6a6a6a; }

.tmbg-tabs {
    display: flex;
    margin: 12px 14px 0;
    border-bottom: 1px solid #ececec;
}
.tmbg-tabs[hidden] { display: none !important; }
.tmbg-tab {
    flex: 1;
    padding: 8px 0 9px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    color: #9a9a9a;
    background: none;
    border: 0;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    cursor: pointer;
}
.tmbg-tab[aria-selected="true"] { color: #1a1a1a; border-bottom-color: #f99d27; }

.tmbg-body {
    padding: 14px 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.tmbg-body[hidden] { display: none !important; }

.tmbg-fld { display: flex; flex-direction: column; gap: 4px; }
.tmbg-lab { font-size: 11px; font-weight: 700; color: #6a6a6a; }

.tmbg-input {
    width: 100%;
    border: 1px solid #d3d3d3;
    border-radius: 5px;
    padding: 10px 11px;
    font-family: inherit;
    font-size: 15px;
    color: #1a1a1a;
    background: #fff;
}
.tmbg-input:focus {
    outline: 2px solid #f99d27;
    outline-offset: -1px;
    border-color: #f99d27;
}
.tmbg-input.tmbg-ok  { border-color: #3d9970; }
.tmbg-input.tmbg-bad { border-color: #d0503a; }

.tmbg-hint {
    font-size: 11px;
    color: #8a8a8a;
    line-height: 1.35;
    min-height: 14px;
}
.tmbg-hint.tmbg-bad { color: #c0442f; font-weight: 700; }
.tmbg-hint.tmbg-ok  { color: #2f7a56; font-weight: 700; }

.tmbg-phone-row { display: flex; gap: 6px; }
.tmbg-phone-row .tmbg-input { flex: 1; min-width: 0; }
.tmbg-ccbtn {
    display: flex;
    align-items: center;
    gap: 5px;
    border: 1px solid #d3d3d3;
    border-radius: 5px;
    background: #fafafa;
    padding: 0 10px;
    font-family: inherit;
    font-size: 14px;
    color: #3a3a3a;
    cursor: pointer;
    white-space: nowrap;
}
.tmbg-car { color: #999; font-size: 9px; }

.tmbg-ccpanel {
    border: 1px solid #d3d3d3;
    border-radius: 5px;
    margin-top: 5px;
    max-height: 190px;
    overflow: auto;
    background: #fff;
}
.tmbg-ccpanel[hidden] { display: none !important; }
.tmbg-ccpanel .tmbg-input {
    border: 0;
    border-bottom: 1px solid #ececec;
    border-radius: 0;
}
.tmbg-ccpanel .tmbg-input:focus { outline: none; }
.tmbg-ccopt {
    display: flex;
    width: 100%;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 11px;
    font-family: inherit;
    font-size: 13.5px;
    background: none;
    border: 0;
    border-bottom: 1px solid #f4f4f4;
    text-align: left;
    cursor: pointer;
    color: #1a1a1a;
}
.tmbg-ccopt:last-child { border-bottom: 0; }
.tmbg-ccopt:hover, .tmbg-ccopt:focus { background: #fff6e8; }
.tmbg-ccopt .tmbg-dial { color: #8a8a8a; font-size: 12px; }

.tmbg-pwwrap { position: relative; }
.tmbg-pwwrap .tmbg-input { padding-right: 78px; }
.tmbg-pweye {
    position: absolute;
    right: 9px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: 0;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    color: #8a8a8a;
    cursor: pointer;
}

.tmbg-gbtn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #dadce0;
    border-radius: 5px;
    padding: 11px;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 700;
    color: #3c4043;
    background: #fff;
    cursor: pointer;
    width: 100%;
}
.tmbg-gbtn[hidden] { display: none !important; }
.tmbg-gmark {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    flex: 0 0 15px;
    background: conic-gradient(#ea4335 0 25%, #fbbc05 0 50%, #34a853 0 75%, #4285f4 0);
}
.tmbg-orsep { display: flex; align-items: center; gap: 10px; color: #aaa; font-size: 11px; }
.tmbg-orsep::before, .tmbg-orsep::after { content: ""; flex: 1; height: 1px; background: #ececec; }

/* The Google-RENDERED fallback button. Sits where the custom .tmbg-gbtn was;
   guichet.js swaps visibility between the two the first time a browser
   suppresses google.accounts.id.prompt() (Safari/Firefox with third-party
   cookies blocked, or a prior dismissal cooldown) so there is always a
   working Google entry point, never a dead custom button. */
.tmbg-gnative { width: 100%; display: flex; justify-content: center; }
.tmbg-gnative[hidden] { display: none !important; }

.tmbg-cta {
    background: #f99d27;
    color: #fff;
    border: 1px solid #f99d27;
    border-radius: 5px;
    padding: 12px;
    text-align: center;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
}
.tmbg-cta[disabled] { opacity: .45; cursor: not-allowed; }

.tmbg-linkbtn {
    background: none;
    border: 0;
    font-family: inherit;
    font-size: 11.5px;
    color: #7a7a7a;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    align-self: flex-end;
}

.tmbg-swap { text-align: center; font-size: 12px; color: #7a7a7a; margin: 0; }
.tmbg-swap button {
    background: none;
    border: 0;
    font-family: inherit;
    color: #f99d27;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    text-decoration: underline;
}

.tmbg-legal { font-size: 10px; color: #a0a0a0; text-align: center; line-height: 1.4; margin: 0; }

.tmbg-notice { border-radius: 5px; padding: 10px 11px; font-size: 12px; line-height: 1.4; }
.tmbg-notice[hidden] { display: none !important; }
.tmbg-notice-info { background: #fff6e8; border: 1px solid #f2dcb6; color: #8a6d3b; }
.tmbg-notice-err  { background: #fdeeea; border: 1px solid #f0cdc3; color: #a2432f; }
.tmbg-notice-good { background: #eef8f2; border: 1px solid #c4e4d3; color: #2f7a56; }

.tmbg-okrow {
    display: flex;
    align-items: center;
    gap: 9px;
    background: #fff4e5;
    border-radius: 5px;
    padding: 11px;
    font-size: 13.5px;
    font-weight: 700;
}
.tmbg-ck { color: #f99d27; font-weight: 900; }

.tmbg-donebox {
    padding: 26px 4px 6px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}
.tmbg-donebox .tmbg-hint { text-align: center; }

@media (max-width: 460px) {
    /* Task 8's smoke test checks 390px specifically: full-bleed sheet
       instead of a centered card avoids any risk of horizontal overflow
       from the phone-row / country panel at that width. */
    .tmbg-backdrop { padding: 0; align-items: stretch; }
    .tmbg-dialog { max-width: none; width: 100%; min-height: 100%; border-radius: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .tmbg-dialog, .tmbg-backdrop { transition: none !important; }
}
