/*
 * Azur Loc Auto — international input helpers (public/js/azur-inputs.js).
 * Tokens come from azur-select.css (fallback values given).
 */

/* ---------- Phone: country code inside the field ---------- */
.azur-phone {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
}

.azur-phone__cc {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 2px;
    z-index: 3;
    display: flex;
    align-items: center;
    width: 64px;
    min-height: 44px;
}

.azur-phone__cc-label {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    height: 60%;
    min-height: 24px;
    padding: 0 8px;
    border-inline-end: 1px solid var(--azur-border, #e2e8f0);
    color: var(--azur-slate, #233e5d);
    font-weight: 600;
    font-size: 15px;
    white-space: nowrap;
    pointer-events: none;
}

.azur-phone__cc-label::after {
    content: '';
    width: 6px;
    height: 6px;
    margin-top: -3px;
    border-right: 2px solid var(--azur-muted, #64748b);
    border-bottom: 2px solid var(--azur-muted, #64748b);
    transform: rotate(45deg);
    flex: 0 0 auto;
}

/* the real (native) <select> covers the label: native picker on every device */
.azur-phone__cc-select {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    font-size: 16px;
    -webkit-appearance: none;
    appearance: none;
    border: 0;
}

.azur-phone__cc:focus-within .azur-phone__cc-label {
    outline: 3px solid rgba(0, 137, 182, 0.35);
    outline-offset: 2px;
    border-radius: 6px;
}

.azur-phone__cc-select:disabled {
    cursor: not-allowed;
}

/* ---------- Errors ---------- */
.azur-field-error {
    margin-top: 6px;
    color: var(--azur-danger, #dc3545);
    font-size: 13px;
    line-height: 1.35;
}

.azur-field-error[hidden] {
    display: none;
}

input.azur-invalid,
input.azur-invalid.form-control {
    border-color: var(--azur-danger, #dc3545) !important;
}

input[data-mask="postal"],
input[data-mask="document"] {
    text-transform: uppercase;
}

input[data-mask="postal"]::placeholder,
input[data-mask="document"]::placeholder {
    text-transform: none;
}
