/* First Option Connect v1.0.0 */

.foc-root {
    --foc-primary: #3182b5;
    --foc-primary-dark: #286a94;
    --foc-panel-bg: #F5F7FA;
    --foc-text: #0a2540;
    --foc-muted: #6B7A90;
    --foc-border: rgba(10,37,64,0.10);
    --foc-shadow: 0 14px 44px rgba(10,37,64,0.18);
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.4;
}
.foc-root *, .foc-root *::before, .foc-root *::after { box-sizing: border-box; }

/* Resting pill (refined #3) */
.foc-bubble {
    display: inline-flex; align-items: center; gap: 13px;
    background: #fff; color: var(--foc-text); border: none; border-radius: 15px;
    padding: 11px 17px 11px 13px; cursor: pointer;
    box-shadow: var(--foc-shadow); font-family: inherit;
    transition: transform .15s ease, box-shadow .15s ease;
    animation: foc-entrance .55s cubic-bezier(.2,.8,.2,1) both;
}
.foc-bubble:hover { transform: translateY(-2px); box-shadow: 0 20px 52px rgba(10,37,64,.28); }
.foc-bubble:focus-visible { outline: 3px solid rgba(49,130,181,.3); outline-offset: 3px; }
@keyframes foc-entrance { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

.foc-badge {
    width: 42px; height: 42px; border-radius: 12px; background: var(--foc-primary); color: #fff;
    display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
    transition: background .15s ease, transform .2s ease;
}
.foc-bubble:hover .foc-badge { background: var(--foc-primary-dark); transform: rotate(90deg); }
.foc-badge svg { width: 22px; height: 22px; }

.foc-bubble-text-wrap { display: flex; flex-direction: column; gap: 5px; line-height: 1; align-items: stretch; }
.foc-bubble-text { font-size: 14.5px; font-weight: 700; color: var(--foc-text); letter-spacing: -.01em; white-space: nowrap; }
.foc-bubble-glyphs { display: flex; align-items: center; justify-content: space-between; width: 100%; color: var(--foc-muted); }
.foc-bubble-glyphs svg { width: 15px; height: 15px; display: block; }
.foc-bubble:hover .foc-bubble-glyphs { color: var(--foc-primary); }

/* Panel */
.foc-panel {
    position: absolute; bottom: 72px; right: 0;
    width: 380px; max-width: calc(100vw - 40px);
    background: var(--foc-panel-bg); border-radius: 16px;
    box-shadow: var(--foc-shadow); overflow: hidden;
    animation: foc-in .18s ease-out;
}
@keyframes foc-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.foc-panel[hidden] { display: none; }

/* Header */
.foc-panel-header {
    background: var(--foc-primary); color: #fff;
    padding: 16px 44px 16px 18px;
    display: flex; align-items: center; gap: 10px;
    font-size: 15px; font-weight: 600; position: relative;
}
.foc-back {
    background: transparent; border: none; color: #fff; font-size: 20px; line-height: 1;
    cursor: pointer; padding: 0 4px 0 0; opacity: .9; font-family: inherit;
}
.foc-back:hover { opacity: 1; }
.foc-back[hidden] { display: none; }
.foc-close {
    position: absolute; top: 8px; right: 10px; background: transparent; border: none;
    color: #fff; font-size: 26px; line-height: 1; cursor: pointer; padding: 4px 10px; opacity: .85; font-family: inherit;
}
.foc-close:hover { opacity: 1; }

/* Views */
.foc-view[hidden] { display: none; }
.foc-view-choose { padding: 14px; }
.foc-intro { font-size: 13px; color: var(--foc-muted); margin: 2px 4px 12px; }

/* Channel chooser */
.foc-channels { display: flex; flex-direction: column; gap: 9px; }
.foc-channel {
    display: flex; align-items: center; gap: 13px; width: 100%; text-align: left;
    background: #fff; border: 1.5px solid var(--foc-border); border-radius: 12px;
    padding: 13px 15px; cursor: pointer; font-family: inherit; text-decoration: none;
    transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.foc-channel:hover { border-color: var(--foc-primary); background: #f3f8fc; transform: translateX(2px); }
.foc-channel:focus-visible { outline: 3px solid rgba(49,130,181,.28); outline-offset: 2px; }
.foc-cicon {
    flex: 0 0 auto; width: 42px; height: 42px; border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    background: #e7f1f8; color: var(--foc-primary);
}
.foc-cicon svg { width: 21px; height: 21px; }
.foc-ctext { flex: 1; min-width: 0; }
.foc-clabel { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--foc-text); }
.foc-cdesc { display: block; font-size: 12px; color: var(--foc-muted); margin-top: 1px; line-height: 1.3; }
.foc-cgo { color: var(--foc-muted); font-size: 18px; flex: 0 0 auto; }
.foc-channel:hover .foc-cgo { color: var(--foc-primary); }
.foc-tag { font-size: 9px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 2px 6px; border-radius: 99px; }
.foc-tag-fast   { background: #fff1e8; color: #b5491f; }
.foc-tag-new    { background: #e6f6ff; color: #0277a8; }
.foc-tag-accent { background: var(--foc-accent, #feb829); color: #3a2600; }

/* Form views */
.foc-view-form { padding: 16px 18px 18px; }
.foc-form {
    background: #fff; border-radius: 10px; padding: 16px 18px 18px;
    border: 1px solid var(--foc-border); margin: 0;
}
.foc-field {
    margin-bottom: 14px;
}
.foc-field label {
    display: block; font-size: 12px; color: var(--foc-text); font-weight: 600;
    margin-bottom: 6px; line-height: 1.2;
}
.foc-req { color: #b5491f; font-weight: 700; }
.foc-root .foc-form input[type="text"],
.foc-root .foc-form input[type="tel"],
.foc-root .foc-form input[type="email"],
.foc-root .foc-field input {
    width: 100%; height: 42px; min-height: 42px;
    background: #F8FAFC; border: 2px solid #E2E8F0; border-radius: 8px;
    font-size: 15px; line-height: 1.3; color: var(--foc-text);
    padding: 0 12px; margin: 0; outline: none; box-shadow: none;
    font-family: inherit; box-sizing: border-box;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.foc-root .foc-form input::placeholder { font-size: 15px; color: #94a3b8; }
.foc-root .foc-form input:focus {
    background: #fff; border-color: var(--foc-primary);
    box-shadow: 0 0 0 4px rgba(49,130,181,0.12);
}

/* two-column row inside forms */
.foc-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* call-type pills (schedule) */
.foc-calltype { display: flex; gap: 8px; margin: 4px 0 14px; }
.foc-pill {
    flex: 1; border: 1.5px solid var(--foc-border); background: #fff; color: var(--foc-muted);
    border-radius: 8px; padding: 9px 0; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit;
    transition: all .15s ease;
}
.foc-pill:hover { border-color: #c3d2df; }
.foc-pill-active { border-color: var(--foc-primary); background: #f3f8fc; color: var(--foc-primary); box-shadow: 0 0 0 1px var(--foc-primary); }

/* Honeypot */
.foc-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Compliance */
.foc-compliance { font-size: 11px; color: var(--foc-muted); line-height: 1.45; margin: 14px 0; }

/* Submit */
.foc-submit {
    display: block; width: 100%; background: var(--foc-primary); color: #fff; border: none;
    border-radius: 8px; padding: 12px; font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit;
    opacity: .45; transition: opacity .15s ease, background .15s ease; margin-top: 4px;
}
.foc-submit:not(:disabled) { opacity: 1; }
.foc-submit:not(:disabled):hover { background: var(--foc-primary-dark); }
.foc-submit:disabled { cursor: not-allowed; }
.foc-submit.foc-loading { opacity: .7; cursor: wait; }

.foc-error { color: #B3261E; font-size: 13px; margin: 10px 0 0; text-align: center; }

/* Success */
.foc-success { padding: 40px 24px; text-align: center; color: var(--foc-primary); }
.foc-success p { color: var(--foc-text); font-size: 15px; margin: 14px 0 0; line-height: 1.5; }

/* Mobile */
@media (max-width: 480px) {
    .foc-root { bottom: 14px; right: 14px; left: 14px; }
    .foc-bubble { margin-left: auto; display: flex; width: fit-content; }
    .foc-panel { right: 0; left: 0; width: auto; max-width: none; bottom: 68px; }
    .foc-row2 { grid-template-columns: 1fr; gap: 0; }
}