/* plg_system_phonesms — inline phone verification UI */

.plg-phonesms-wrapper {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.plg-phonesms-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.plg-phonesms-status {
    color: #666;
    font-size: 0.9em;
}

.plg-phonesms-error {
    color: #c62828;
    font-size: 0.9em;
}

.plg-phonesms-callbox {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 14px 16px;
    background: #f5f9ff;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.plg-phonesms-instruct {
    margin: 0;
    color: #444;
    font-size: 0.92em;
}

.plg-phonesms-callphone {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: #fff;
    border: 1px solid #d0d7e0;
    border-radius: 6px;
    padding: 10px 14px;
}

.plg-phonesms-callphone-label {
    color: #666;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.plg-phonesms-callphone-number {
    font-size: 1.5em;
    font-weight: 700;
    color: #0d47a1;
    text-decoration: none;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}
.plg-phonesms-callphone-number:hover {
    text-decoration: underline;
}

.plg-phonesms-call-actions {
    display: flex;
    justify-content: flex-start;
}

.plg-phonesms-waiting {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #555;
    font-size: 0.92em;
}

.plg-phonesms-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #cdd5e0;
    border-top-color: #1565c0;
    border-radius: 50%;
    animation: plg-phonesms-spin 0.8s linear infinite;
}

@keyframes plg-phonesms-spin {
    to { transform: rotate(360deg); }
}

/* Stack the user_type radio options vertically (not inline) for clearer
   "physical person / company representative" choice on registration. */
.plg-cardservice-radio-stack {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.plg-cardservice-radio-stack label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}
.plg-cardservice-radio-stack input[type="radio"] {
    margin: 0;
}

/* Custom-rendered consent rows from edit.php override use this class.
   See the override's special-case for str_starts_with($field->fieldname, 'consent_'). */
.cardservice-consent-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}
.cardservice-consent-row input[type="checkbox"] {
    margin-top: 4px;
    flex-shrink: 0;
    cursor: pointer;
}
.cardservice-consent-row .cardservice-consent-text {
    line-height: 1.4;
    cursor: pointer;
}
.cardservice-consent-row .cardservice-consent-text a {
    text-decoration: underline;
}

/* Two-tone phone mask:
   "+7" + typed digits stay in the input's normal black colour;
   the un-typed mask suffix shows through as a grey hint.
   Implementation: monospace font on both, hint absolutely positioned
   under the input — input's transparent-only-at-empty-positions visual
   reveals the hint. Both share padding/font so chars line up. */
.phone-mask-wrap {
    position: relative;
    display: block;
    width: 100%;
}
.phone-mask-input,
.phone-mask-hint {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, Menlo, monospace;
    font-size: 1rem;
    letter-spacing: 0.02em;
}
.phone-mask-input {
    position: relative;
    z-index: 2;
    background: transparent !important;
}
.phone-mask-hint {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    padding: inherit;
    color: #9aa4b2;
    pointer-events: none;
    z-index: 1;
    white-space: pre;
    /* Inherit input's box model */
    box-sizing: border-box;
}
/* Ensure hint inherits the input's exact padding regardless of theme */
.phone-mask-wrap > .phone-mask-input + .phone-mask-hint { /* selector specificity */
}
/* When the input has its own focus / hover background, keep hint visible */
.phone-mask-input:focus { background: transparent !important; }

.plg-phonesms-meta {
    display: flex;
    gap: 16px;
    align-items: center;
    font-size: 0.9em;
    color: #555;
}

.plg-phonesms-link {
    background: none;
    border: 0;
    padding: 0;
    color: #1565c0;
    cursor: pointer;
    text-decoration: underline;
    font-size: inherit;
}
.plg-phonesms-link:hover { color: #0d47a1; }

.plg-phonesms-verified {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2e7d32;
    font-weight: 600;
}

.plg-phonesms-check {
    display: inline-flex;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: #2e7d32;
    color: #fff;
    align-items: center;
    justify-content: center;
    font-size: 0.85em;
}

/* Auth-method icon grid (profile view: "Контакты и безопасность" + "Безопасность и вход").
   Active = full theme color, inactive = ~25% opacity. Hover shows tooltip
   via uk-tooltip on the parent element. */
.cardservice-auth-grid {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.cardservice-auth-grid--lg { gap: 14px; margin: 4px 0; }

.cardservice-auth-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid currentColor;
    color: inherit;
    transition: opacity 200ms ease, transform 150ms ease;
    cursor: help;
}
.cardservice-auth-grid--lg .cardservice-auth-icon {
    width: 44px;
    height: 44px;
}
.cardservice-auth-icon svg {
    width: 60%;
    height: 60%;
}
.cardservice-auth-icon.is-active {
    opacity: 1;
}
.cardservice-auth-icon.is-inactive {
    opacity: 0.25;
}
.cardservice-auth-icon:hover {
    transform: translateY(-1px);
}

/* MFA icons — same shape as the four auth methods, but coloured (theme
   primary border + same color stroke). Always rendered as `is-active`. */
.cardservice-auth-icon--mfa {
    border-color: currentColor;
}
.cardservice-auth-icon--mfa.is-active {
    opacity: 1;
}
.cardservice-auth-divider {
    width: 1px;
    align-self: stretch;
    background: currentColor;
    opacity: 0.18;
    margin: 0 4px;
}
.cardservice-auth-grid--lg .cardservice-auth-divider {
    margin: 0 6px;
}

/* Profile-view contact tile (phone / email) — uk-h4 minus a couple of px,
   so a side-by-side phone + email pair fits without truncation but still
   reads like a heading-tier value. */
.cardservice-contact-value {
    font-size: 1.35rem;
    line-height: 1.25;
}
