.ruc-lookup { display:grid; gap:10px; min-width:0; }
.ruc-lookup[hidden], .ruc-lookup [hidden] { display:none; }
.ruc-lookup-actions { display:flex; flex-wrap:wrap; gap:8px; }
.ruc-lookup button { min-height:40px; border:0; border-radius:10px; padding:9px 13px; font:inherit; font-size:.73rem; font-weight:600; color:#096b75; background:#e8f3f2; cursor:pointer; }
.ruc-lookup button:disabled { opacity:.6; cursor:default; }
.ruc-lookup button:focus-visible { outline:2px solid #087c87; outline-offset:3px; }
.ruc-lookup > p { font-size:.7rem; line-height:1.6; color:var(--color-text-light); margin:0; }
.ruc-lookup > p:empty { display:none; }
.ruc-lookup [data-error='true'] { color:#aa423b; }
body.dark-mode .ruc-lookup button { background:#2d4b50; color:#b7e7de; }
@media(max-width:560px) { .ruc-lookup button { min-height:44px; } }

.ruc-name-verification { display:block; margin-top:4px; font-size:.6rem; line-height:1.45; font-weight:400; color:#66777b; }
.ruc-name-verification[hidden] { display:none; }
.ruc-name-verification[data-verified='true'] { color:#66777b; }
input[data-ruc-verified='true'] { cursor:default; }
body.dark-mode .ruc-name-verification[data-verified='true'] { color:#a1d8c7; }

.ruc-address-info { margin-top:4px; }
.ruc-address-info[hidden] { display:none; }
.ruc-address-info p { margin:0; color:var(--color-text-light); font-size:.6rem; line-height:1.45; font-weight:400; overflow-wrap:anywhere; }
.ruc-address-info button { border:0; padding:4px 0; background:transparent; color:#096b75; font:inherit; font-size:.7rem; cursor:pointer; text-decoration:underline; text-underline-offset:3px; }
.ruc-address-info button:focus-visible { outline:2px solid #087c87; outline-offset:3px; }
body.dark-mode .ruc-address-info button { color:#b7e7de; }

/* A single, quiet reading path: identity, fiscal address, then contact. */
.local-customer-minimal[open] { width:min(580px, calc(100% - 32px)); border-radius:24px; }
.local-customer-minimal > form > header { padding:26px 28px 22px; border:0; }
.local-customer-minimal .local-customer-dialog-title h2 { font-size:1.22rem; letter-spacing:-.035em; font-weight:700; }
.local-customer-minimal .local-customer-form-body { padding:0 28px 8px; gap:0; }
.local-customer-minimal .local-customer-grid { gap:18px 16px; }
.local-customer-minimal .admin-form-field { gap:0; }
.local-customer-minimal .admin-form-field > span { margin-bottom:8px; color:var(--color-text-dark); font-size:.67rem; font-weight:500; }
.local-customer-minimal .admin-form-field input,
.local-customer-minimal .admin-form-field select { min-height:48px; padding:12px 14px; border-radius:12px; font-size:.76rem; background:#f3f6f6; transition:background 180ms ease, border-color 180ms ease, box-shadow 180ms ease; }
.local-customer-minimal .ruc-lookup { margin-top:-10px; gap:0; }
.local-customer-minimal .ruc-lookup-actions { justify-content:flex-end; }
.local-customer-minimal .ruc-lookup button { min-height:32px; padding:4px 0 4px 12px; border-radius:6px; background:transparent; font-size:.65rem; font-weight:500; }
.local-customer-minimal .ruc-lookup button:hover { color:#064c56; }
.local-customer-minimal .ruc-name-verification,
.local-customer-minimal .ruc-address-info p { font-size:.58rem; margin:0; line-height:1.45; color:#66777b; font-weight:400; }
.local-customer-minimal .ruc-name-verification { margin-top:4px; }
.local-customer-minimal [data-local-customer-message]:empty { display:none; }
.local-customer-minimal [data-local-customer-message]:not(:empty) { margin-top:12px; }
.local-customer-minimal .local-customer-form-actions { padding:22px 28px 26px; gap:10px; }
.local-customer-minimal .local-customer-form-actions > button { min-height:46px; border-radius:12px; font-size:.7rem; font-weight:600; transition:background 180ms ease, box-shadow 180ms ease; }
.local-customer-minimal .local-customer-form-actions > button:not(.btn) { background:transparent; }
.local-customer-minimal .local-customer-form-actions > button:not(.btn):hover { background:#f0f5f5; }
.local-customer-minimal .local-customer-form-actions > .btn:hover { background:#086976; box-shadow:0 4px 12px rgba(11,123,135,.13); }
.ruc-name-verification[data-verified='true'], .ruc-address-info:not([hidden]) { animation:ruc-field-reveal 200ms ease-out both; }
@keyframes ruc-field-reveal { from { opacity:0; } to { opacity:1; } }
@media(max-width:560px) {
    .local-customer-minimal[open] { width:calc(100% - 20px); max-height:calc(100dvh - 24px); border-radius:22px; }
    .local-customer-minimal > form > header { padding:22px 20px 20px; }
    .local-customer-minimal .local-customer-form-body { padding:0 20px 8px; }
    .local-customer-minimal .local-customer-grid { gap:16px; }
    .local-customer-minimal .local-customer-form-actions { padding:20px; }
    .local-customer-minimal .local-customer-form-actions > .btn { min-width:0; flex:2; }
    .local-customer-minimal .local-customer-form-actions > button:not(.btn) { flex:1; }
}
@media(prefers-reduced-motion:reduce) {
    .ruc-name-verification[data-verified='true'], .ruc-address-info:not([hidden]) { animation:none; }
    .local-customer-minimal .admin-form-field input, .local-customer-minimal .admin-form-field select,
    .local-customer-minimal .local-customer-form-actions > button { transition:none; }
}

.ruc-number-control { position:relative; width:100%; min-width:0; }
.ruc-number-control input:not([type='hidden']),
.local-customer-minimal .ruc-number-control input { width:100%; padding-right:48px; }
.ruc-refresh { position:absolute; right:3px; top:50%; display:grid; place-items:center; width:42px; height:42px; padding:0; border:0; border-radius:10px; transform:translateY(-50%); color:#688085; background:transparent; cursor:pointer; transition:background 160ms ease, color 160ms ease; }
.ruc-refresh[hidden] { display:none; }
.ruc-refresh:hover { color:#096b75; background:rgba(9,107,117,.06); }
.ruc-refresh:focus-visible { outline:2px solid #087c87; outline-offset:-3px; }
.ruc-refresh:disabled { cursor:default; opacity:.5; }
.ruc-refresh svg { width:17px; height:17px; display:block; }
.ruc-inline-spinner { display:none; width:16px; height:16px; box-sizing:border-box; border:1.5px solid rgba(104,128,133,.2); border-top-color:#688085; border-radius:50%; }
.ruc-number-control[data-loading='true'] .ruc-refresh svg { display:none; }
.ruc-number-control[data-loading='true'] .ruc-inline-spinner { display:block; animation:ruc-refresh-spin 800ms linear infinite; }
.ruc-number-control[data-loading='true'] .ruc-refresh:disabled { opacity:1; }
@keyframes ruc-refresh-spin { to { transform:rotate(360deg); } }
body.dark-mode .ruc-refresh { color:#acc0c5; }
body.dark-mode .ruc-name-verification[data-verified='true'],
body.dark-mode .ruc-address-info p { color:#a8b9be; }
@media(prefers-reduced-motion:reduce) {
    .ruc-number-control[data-loading='true'] .ruc-inline-spinner { animation:none; }
    .ruc-refresh { transition:none; }
}

.ruc-name-control { position:relative; min-width:0; width:100%; }
.ruc-name-control input { width:100%; }
.ruc-name-control:has([data-verified='true']) input,
.local-customer-minimal .ruc-name-control:has([data-verified='true']) input { padding-right:46px; }
.ruc-name-control .ruc-name-verification[data-verified='true'] { position:absolute; top:50%; right:13px; display:grid; place-items:center; width:22px; height:22px; margin:0; transform:translateY(-50%); color:#498274; animation:none; }
.ruc-name-verification[data-verified='true'] svg { display:block; width:18px; height:18px; }
.ruc-name-verification[data-verified='true']:focus-visible { outline:2px solid #087c87; outline-offset:3px; border-radius:5px; }
body.dark-mode .ruc-name-control .ruc-name-verification[data-verified='true'] { color:#94c5b6; }
