*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    background: transparent;
}

.lynq-root, .lynq-form, .lynq-field, .lynq-inputWrap {
    min-width: 0;
}

:root {
    --lynq-bg: #ffffff;
    --lynq-fg: #0f172a;
    --lynq-muted: #475569;
    --lynq-border: #e2e8f0;
    --lynq-border-focus: #3b82f6;
    --lynq-error: #ef4444;
    --lynq-radius: 12px;
    --lynq-gap: 6px;
    --lynq-font: system-ui, -apple-system, Segoe UI, Roboto, Inter, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    --lynq-input-h: 52px; /* a bit taller to fit floating label nicely */
    --lynq-shadow-focus: 0 0 0 4px rgba(59, 130, 246, .15);
    --lynq-label-float-size: 11px;
    --lynq-label-inset-size: 14px;
}

/*@media (prefers-color-scheme: dark) {*/
/*    :root {*/
/*        --lynq-bg: #0b1220;*/
/*        --lynq-fg: #e5e7eb;*/
/*        --lynq-muted: #93a3b8;*/
/*        --lynq-border: #1f2a44;*/
/*        --lynq-border-focus: #60a5fa;*/
/*        --lynq-error: #f87171;*/
/*        --lynq-shadow-focus: 0 0 0 4px rgba(96, 165, 250, .2);*/
/*    }*/
/*}*/

body {
    color: var(--lynq-fg);
    font-family: var(--lynq-font);
    -webkit-font-smoothing: antialiased;
}

.lynq-root {
    width: 100%;
    max-width: 100%;
    padding: 8px;
}

.lynq-form {
    display: grid;
    gap: var(--lynq-gap);
    width: 100%;
}

.lynq-field {
    display: grid;
    gap: 6px;
    width: 100%;
    max-width: 100%;
}

.lynq-inputWrap {
    position: relative;
    width: 100%;
    max-width: 100%;
}

/* Brand icon inside the PAN input */
.lynq-brandIcon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%) scale(.96);
    width: 34px;
    height: 22px;
    object-fit: contain;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
}

.lynq-brandIcon.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) scale(1);
}

/* Make room for the brand icon in the PAN field */
#lynq-number.lynq-input {
    padding-right: 56px;
}

.lynq-input {
    appearance: none;
    display: block;
    width: 100%;
    max-width: 100%;
    height: var(--lynq-input-h);
    border: 1px solid var(--lynq-border);
    border-radius: var(--lynq-radius);
    background: var(--lynq-bg);
    color: var(--lynq-fg);
    padding: 10px 14px 10px; /* top padding leaves room for inset label */
    font-size: 16px;
    line-height: 1;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.lynq-input:focus {
    outline: none;
    border-color: var(--lynq-border-focus);
    box-shadow: var(--lynq-shadow-focus);
}

.lynq-input[aria-invalid="true"] {
    border-color: var(--lynq-error);
}

/* Placeholder appears only on focus for a cleaner idle state */
.lynq-input::placeholder {
    color: var(--lynq-muted);
    opacity: 0;
    transition: opacity .12s ease;
}

.lynq-input:focus::placeholder {
    opacity: .6;
}

.lynq-input:-webkit-autofill:not(.lynq-autofill-delay),
.lynq-input:-webkit-autofill:hover:not(.lynq-autofill-delay),
.lynq-input:-webkit-autofill:focus:not(.lynq-autofill-delay),
.lynq-input:-webkit-autofill:active:not(.lynq-autofill-delay) {
    -webkit-text-fill-color: var(--lynq-fg);
    caret-color: var(--lynq-fg);
    box-shadow: 0 0 0 100px var(--lynq-bg) inset !important;
    transition: none !important;
}

/* Floating label */
.lynq-floatLabel {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: var(--lynq-label-inset-size);
    color: var(--lynq-muted);
    pointer-events: none;
    background: transparent; /* we lift it above border when floating */
    padding: 0 4px;
    transition: all .15s ease;
    line-height: 1;
}

/* When focused or has value (i.e., not placeholder-shown), float up */
.lynq-input:focus + .lynq-floatLabel,
.lynq-input:not(:placeholder-shown) + .lynq-floatLabel {
    top: -8px;
    transform: none;
    background: var(--lynq-bg);
    font-size: var(--lynq-label-float-size);
    color: var(--lynq-muted);
    z-index: 1;
}

.lynq-error {
    min-height: 16px;
    font-size: 12px;
    color: var(--lynq-error);
    line-height: 1.2;
    visibility: hidden; /* hidden until touched */
}

.lynq-error.is-visible {
    visibility: visible;
}

.lynq-row {
    display: grid;
    gap: var(--lynq-gap);
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    width: 100%;
    max-width: 100%;
}

.lynq-btn {
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 12px;
    background: var(--lynq-border-focus);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: .2px;
    cursor: pointer;
    transition: transform .06s ease, opacity .15s ease, filter .15s ease;
}

.lynq-btn:disabled {
    opacity: .55;
    cursor: not-allowed;
    filter: grayscale(.2);
}

.lynq-btn:active:not(:disabled) {
    transform: translateY(1px);
}

.lynq-btn.is-loading {
    opacity: .85;
    cursor: progress;
}


@media (max-width: 420px) {
    .lynq-row {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lynq-input {
        transition: none;
    }

    .lynq-floatLabel {
        transition: none;
    }

    .lynq-btn {
        transition: none;
    }
}