/* Customer "log in or sign up" modal (views/front-end/modern/customer-auth-modal.php).
   Colours and fonts come from the storefront theme (Bootstrap variables). */
#modal-signin .modal-dialog { max-width: 440px; }
#modal-signin .modal-content { border: 0; border-radius: 1rem; }

.ca { position: relative; padding: 2.25rem 2.25rem 2rem; text-align: left; }
.ca .btn-close { position: absolute; top: 1rem; right: 1rem; z-index: 2; }
.ca-screen[hidden] { display: none !important; }

.ca-title {
    display: flex;
    align-items: flex-start;
    gap: .25rem;
    font-size: 1.6rem;
    line-height: 1.25;
    font-weight: 700;
    margin: 0 1.5rem .75rem 0;
}
.ca-back {
    flex: none;
    border: 0;
    background: none;
    padding: 0 .15rem 0 0;
    margin-left: -.4rem;
    font-size: 1.75rem;
    line-height: 1;
    color: inherit;
    cursor: pointer;
}
.ca-back:hover { color: var(--bs-primary); }

.ca-text { color: var(--bs-secondary-color, #60697b); margin-bottom: 1.25rem; overflow-wrap: anywhere; }
.ca-text strong { color: var(--bs-body-color, #343f52); }
.ca-small { font-size: .9rem; margin: .25rem 0 1rem; }
.ca-hint { font-size: .8rem; color: var(--bs-secondary-color, #60697b); margin: 0 0 1rem .25rem; }
.ca-notice { font-size: .9rem; color: #0f5132; background: #d1e7dd; border-radius: .5rem; padding: .6rem .8rem; margin: -.5rem 0 1rem; }

.ca-field { position: relative; }
.ca-field .form-control { padding-right: 4.5rem; }
/* Country code picker: a small button in the field that opens a searchable list under it. */
.ca-cc { position: absolute; right: .5rem; top: 50%; transform: translateY(-50%); z-index: 3; }
.ca-cc[hidden] { display: none; }
.ca-cc-btn {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    border: 0;
    background: transparent;
    padding: .35rem .55rem;
    border-radius: .5rem;
    font-weight: 600;
    font-size: .9rem;
    color: inherit;
    white-space: nowrap;
    cursor: pointer;
}
.ca-cc-btn:hover, .ca-cc-btn[aria-expanded="true"] { background: rgba(0, 0, 0, .06); }
.ca-cc-btn:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: 1px; }
.ca-cc-btn i { font-size: 1.1rem; transition: transform .15s; }
.ca-cc-btn[aria-expanded="true"] i { transform: rotate(180deg); }
.ca-field .form-control { padding-right: 6.5rem; }

.ca-cc-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + .35rem);
    z-index: 20;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .1);
    border-radius: .75rem;
    box-shadow: 0 .75rem 2rem rgba(30, 34, 40, .15);
    padding: .5rem;
}
.ca-cc-panel[hidden] { display: none; }
.ca-cc-panel .form-control { padding-right: .75rem; height: auto; min-height: 0; }
.ca-cc-list { list-style: none; margin: .4rem 0 0; padding: 0; max-height: 15rem; overflow-y: auto; }
.ca-cc-list li {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem .6rem;
    border-radius: .5rem;
    font-size: .9rem;
    cursor: pointer;
}
.ca-cc-list li:hover, .ca-cc-list li.is-active { background: rgba(var(--bs-primary-rgb, 63, 120, 224), .08); }
.ca-cc-list li[aria-selected="true"] { font-weight: 600; color: var(--bs-primary); }
.ca-cc-iso { flex: none; width: 2rem; font-size: .75rem; font-weight: 600; color: var(--bs-secondary-color, #60697b); }
.ca-cc-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-cc-code { flex: none; color: var(--bs-secondary-color, #60697b); }
.ca-cc-empty { padding: .6rem; font-size: .85rem; color: var(--bs-secondary-color, #60697b); }
.ca-eye {
    position: absolute;
    right: .5rem;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: none;
    font-size: 1.2rem;
    padding: .35rem .5rem;
    color: var(--bs-secondary-color, #60697b);
    cursor: pointer;
}
.ca-code { letter-spacing: .3em; font-size: 1.15rem; }

.ca-error { color: var(--bs-danger, #e2626b); font-size: .9rem; margin: -.4rem 0 .8rem .25rem; }
.ca-error:empty { display: none; }

.ca-link { color: var(--bs-primary); text-decoration: underline; }
.ca-link:hover { opacity: .85; }

.ca-choice { position: relative; display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 2.9rem; }
.ca-choice i, .ca-choice img { position: absolute; left: 1.1rem; font-size: 1.25rem; }

.ca-or { display: flex; align-items: center; gap: .75rem; margin: 1.25rem 0; font-size: .75rem; font-weight: 700; color: var(--bs-secondary-color, #60697b); }
.ca-or::before, .ca-or::after { content: ""; flex: 1; height: 1px; background: rgba(0, 0, 0, .1); }

.ca-legal { font-size: .85rem; color: var(--bs-secondary-color, #60697b); margin: 1rem 0 0; }
.ca-legal a { color: var(--bs-primary); text-decoration: underline; }

.ca .btn.is-loading { pointer-events: none; opacity: .7; }
.ca .btn.is-loading::before {
    content: "";
    display: inline-block;
    width: 1rem;
    height: 1rem;
    margin-right: .5rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    vertical-align: -.15em;
    animation: ca-spin .7s linear infinite;
}
@keyframes ca-spin { to { transform: rotate(360deg); } }

/* "Continue with Google" before a Client ID is set: visible but clearly unavailable. */
.ca-choice--off, .ca-choice--off:disabled { opacity: .5; cursor: not-allowed; pointer-events: auto; }

/* "Continue with Google": our look-alike button underneath, Google's real button stretched over it
   (nearly transparent) so the click lands in Google's frame. Hover/focus styles follow the overlay. */
.ca-google-wrap { position: relative; }
.ca-google-face { width: 100%; pointer-events: none; }
.ca-google-wrap.is-hover .ca-google-face {
    color: var(--bs-btn-hover-color, #fff);
    background-color: var(--bs-btn-hover-bg, var(--bs-primary));
    border-color: var(--bs-btn-hover-border-color, var(--bs-primary));
}
.ca-google-wrap.is-hover .ca-google-face img { background: #fff; border-radius: 50%; padding: 2px; }
.ca-google-wrap:focus-within .ca-google-face { box-shadow: 0 0 0 .2rem rgba(63, 120, 224, .35); }
.ca-google { position: absolute; left: 50%; top: 50%; opacity: .01; z-index: 2; transform-origin: center; }

@media (max-width: 575.98px) {
    #modal-signin .modal-dialog { margin: 0; max-width: none; min-height: 100%; align-items: stretch; }
    #modal-signin .modal-content { border-radius: 0; min-height: 100vh; }
    .ca { padding: 2rem 1rem; }
    .ca-title { font-size: 1.4rem; }
}
