/* I4S Lead Router Widget */
#i4s-lrw-root {
    --i4s-lrw-color: #173a67;
    --i4s-lrw-radius: 14px;
    position: fixed;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.45;
}
#i4s-lrw-root.i4s-lrw-pos-bottom-right { right: 20px; bottom: 20px; }
#i4s-lrw-root.i4s-lrw-pos-bottom-left { left: 20px; bottom: 20px; }
#i4s-lrw-root.i4s-lrw-pos-bottom-center { left: 50%; bottom: 20px; transform: translateX(-50%); }

.i4s-lrw-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--i4s-lrw-color);
    color: #fff;
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 26px rgba(9, 32, 52, 0.28);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.i4s-lrw-toggle:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(9, 32, 52, 0.34); }
.i4s-lrw-toggle-icon { font-size: 16px; }

.i4s-lrw-panel {
    position: absolute;
    bottom: 64px;
    width: min(380px, calc(100vw - 40px));
    max-height: min(76vh, 640px);
    display: flex;
    flex-direction: column;
    background: #fff;
    color: #0b1f33;
    border-radius: var(--i4s-lrw-radius);
    box-shadow: 0 24px 60px rgba(9, 32, 52, 0.28);
    overflow: hidden;
}
#i4s-lrw-root.i4s-lrw-pos-bottom-right .i4s-lrw-panel { right: 0; }
#i4s-lrw-root.i4s-lrw-pos-bottom-left .i4s-lrw-panel { left: 0; }
#i4s-lrw-root.i4s-lrw-pos-bottom-center .i4s-lrw-panel { left: 50%; transform: translateX(-50%); }

.i4s-lrw-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--i4s-lrw-color);
    color: #fff;
}
.i4s-lrw-close {
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}
.i4s-lrw-body { padding: 16px; overflow-y: auto; }
.i4s-lrw-sub, .i4s-lrw-desc { color: #3a4a5e; margin: 0 0 12px; }
.i4s-lrw-notice {
    background: #fff4f4;
    border: 1px solid #e0b4b4;
    color: #7a2b2b;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 12.5px;
    margin: 0 0 12px;
}

.i4s-lrw-choice {
    display: block;
    width: 100%;
    text-align: left;
    background: #f4f7fb;
    border: 1px solid #dbe4ee;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 10px;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 600;
    color: #16324f;
    transition: border-color 0.12s ease, background 0.12s ease;
}
.i4s-lrw-choice:hover { border-color: var(--i4s-lrw-color); background: #eaf1fa; }

.i4s-lrw-back {
    background: transparent;
    border: 0;
    color: var(--i4s-lrw-color);
    cursor: pointer;
    padding: 0 0 8px;
    font-size: 13px;
    font-weight: 600;
}

.i4s-lrw-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}
.i4s-lrw-field { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: #48586b; }
.i4s-lrw-field > span { font-weight: 600; }
.i4s-lrw-field input,
.i4s-lrw-field select,
.i4s-lrw-form textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #cdd8e4;
    border-radius: 8px;
    padding: 9px 10px;
    font-size: 13.5px;
    font-family: inherit;
    color: #0b1f33;
    background: #fff;
}
.i4s-lrw-form textarea { resize: vertical; }
.i4s-lrw-form > label.i4s-lrw-field { display: flex; margin-bottom: 10px; }

.i4s-lrw-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: #48586b;
    margin-bottom: 10px;
}
.i4s-lrw-check input { margin-top: 2px; }

.i4s-lrw-submit {
    width: 100%;
    background: var(--i4s-lrw-color);
    color: #fff;
    border: 0;
    border-radius: 10px;
    padding: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}
.i4s-lrw-submit:disabled { opacity: 0.7; cursor: default; }

.i4s-lrw-msg { font-size: 13px; margin: 4px 0 10px; min-height: 1px; }
.i4s-lrw-msg.is-error { color: #b3261e; }
.i4s-lrw-msg.is-success { color: #1a7f45; font-weight: 600; }

/* honeypot: visually and programmatically hidden from humans */
.i4s-lrw-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 480px) {
    .i4s-lrw-grid { grid-template-columns: 1fr; }
    .i4s-lrw-toggle-label { display: none; }
    .i4s-lrw-toggle { padding: 14px; }
    .i4s-lrw-panel { width: calc(100vw - 24px); }
}

@media (prefers-color-scheme: dark) {
    .i4s-lrw-panel { background: #12202f; color: #e7eef6; }
    .i4s-lrw-sub, .i4s-lrw-desc { color: #a9bccf; }
    .i4s-lrw-choice { background: #1b2c3e; border-color: #2b3f55; color: #dce7f2; }
    .i4s-lrw-choice:hover { background: #223449; }
    .i4s-lrw-field { color: #a9bccf; }
    .i4s-lrw-field input, .i4s-lrw-field select, .i4s-lrw-form textarea {
        background: #0e1a26; border-color: #2b3f55; color: #e7eef6;
    }
    .i4s-lrw-check { color: #a9bccf; }
}
