/**
 * INFRONT Address Autocomplete styles.
 * Front office: Google suggestion dropdown (.pac-*).
 * Back office: admin configuration panel (.ia-admin, .ia-status).
 *
 * @author INFRONT
 */

:root {
    --ia-brand: #ff5a1f;
    --ia-brand-dark: #1f2937;
    --ia-ok: #1f9d55;
    --ia-error: #e3342f;
    --ia-border: #e5e7eb;
}

/* ----------------------------------------------------------------------- */
/* Front office: Google Places suggestion dropdown                         */
/* ----------------------------------------------------------------------- */

.pac-container {
    border: 1px solid var(--ia-border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.12);
    margin-top: 4px;
    padding: 4px;
    background: #fff;
    font-family: inherit;
    z-index: 99999;
}

.pac-item {
    border: 0;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    line-height: 1.4;
    color: var(--ia-brand-dark);
}

.pac-item:hover,
.pac-item-selected,
.pac-item-selected:hover {
    background: rgba(255, 90, 31, 0.08);
}

.pac-item-query {
    font-size: 14px;
    color: var(--ia-brand-dark);
}

.pac-matched {
    font-weight: 700;
}

.pac-icon {
    margin-right: 8px;
}

.hdpi.pac-logo:after,
.pac-logo:after {
    margin: 6px 8px;
}

/* After a selection we force the dropdown closed. !important beats the inline
   display:block that Google keeps re-applying. Cleared on next keystroke. */
body.ia-pac-hidden .pac-container {
    display: none !important;
}

/* Subtle success cue on a completed address field */
input.is-valid {
    border-color: var(--ia-ok) !important;
    box-shadow: 0 0 0 1px rgba(31, 157, 85, 0.25);
}

/* ----------------------------------------------------------------------- */
/* Back office: configuration panel                                        */
/* ----------------------------------------------------------------------- */

.ia-admin {
    border-radius: 10px;
    overflow: hidden;
}

.ia-admin__header {
    background: linear-gradient(120deg, var(--ia-brand-dark), #111827);
    color: #fff;
    padding: 22px 24px;
}

.ia-admin__brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ia-admin__logo {
    background: var(--ia-brand);
    color: #fff;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 14px;
}

.ia-admin__title {
    font-size: 20px;
    font-weight: 700;
}

.ia-admin__subtitle {
    margin: 10px 0 0;
    opacity: 0.85;
    font-size: 14px;
}

.ia-admin__card {
    padding: 20px 24px;
}

.ia-admin__card h2 {
    margin-top: 0;
    font-size: 18px;
    color: var(--ia-brand-dark);
}

.ia-admin__steps,
.ia-admin__faq ul {
    padding-left: 18px;
    line-height: 1.9;
}

.ia-admin__faq {
    margin-top: 16px;
    padding: 16px;
    background: #f9fafb;
    border: 1px solid var(--ia-border);
    border-radius: 8px;
}

.ia-admin__faq code {
    background: #eef2ff;
    padding: 2px 6px;
    border-radius: 4px;
}

.ia-status {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    font-weight: 600;
    margin-bottom: 8px;
}

.ia-status__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.ia-status--loading {
    background: #f3f4f6;
    color: #4b5563;
}

.ia-status--loading .ia-status__dot {
    background: #9ca3af;
    animation: ia-pulse 1s ease-in-out infinite;
}

.ia-status--ok {
    background: rgba(31, 157, 85, 0.1);
    color: var(--ia-ok);
}

.ia-status--ok .ia-status__dot {
    background: var(--ia-ok);
}

.ia-status--error {
    background: rgba(227, 52, 47, 0.1);
    color: var(--ia-error);
}

.ia-status--error .ia-status__dot {
    background: var(--ia-error);
}

@keyframes ia-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}
