/*!
 * Softbee Contact form + Contact hub widget styles — source.
 *
 * Canonical source: src/inc/scss/contact.scss
 * Published copy:   wp-content/plugins/softbee-lead-tool/build/css/contact.css
 *
 * The file is plain CSS that lives in a .scss extension so it can sit next
 * to the rest of the SCSS sources without confusing the editor. When making
 * changes, edit this file and copy the result to build/css/contact.css.
 */

.softbee-cf,
.softbee-ch {
    --softbee-c-primary: #1ec579;
    --softbee-c-primary-dark: #16a263;
    --softbee-c-text: #1a202c;
    --softbee-c-muted: #64748b;
    --softbee-c-border: #e2e8f0;
    --softbee-c-border-strong: #cbd5e1;
    --softbee-c-surface: #ffffff;
    --softbee-c-surface-2: #f8fafc;
    --softbee-c-error: #dc2626;
    --softbee-c-success: #16a34a;
    --softbee-c-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --softbee-c-shadow-md: 0 8px 30px -10px rgba(15, 23, 42, 0.25);
    --softbee-c-radius: 12px;
    --softbee-c-radius-sm: 8px;
    --softbee-c-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    font-family: var(--softbee-c-font);
    color: var(--softbee-c-text);
    box-sizing: border-box;
}

.softbee-cf *,
.softbee-cf *::before,
.softbee-cf *::after,
.softbee-ch *,
.softbee-ch *::before,
.softbee-ch *::after {
    box-sizing: border-box;
}

/* =========================================================================
 * CONTACT FORM
 * ========================================================================= */

/* ----- Floating positioning ----- */

.softbee-cf-position-floating {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 99998;
}

.softbee-cf-position-floating .softbee-cf-panel {
    position: absolute;
    right: 0;
    bottom: 72px;
    width: 380px;
    max-width: calc(100vw - 40px);
    background: var(--softbee-c-surface);
    border-radius: var(--softbee-c-radius);
    box-shadow: var(--softbee-c-shadow-md);
    padding: 20px;
    display: none;
}

.softbee-cf-position-floating .softbee-cf-panel[data-open="true"] {
    display: block;
    animation: softbee-cf-pop 0.18s ease-out;
}

/* ----- Click (button reveals an inline panel below) ----- */

.softbee-cf-position-click {
    position: relative;
}

.softbee-cf-position-click .softbee-cf-panel {
    background: var(--softbee-c-surface);
    border: 1px solid var(--softbee-c-border);
    border-radius: var(--softbee-c-radius);
    box-shadow: var(--softbee-c-shadow-md);
    padding: 24px;
    margin-top: 12px;
    display: none;
    position: relative;
}

.softbee-cf-position-click .softbee-cf-panel[data-open="true"] {
    display: block;
}

/* ----- Inline ----- */

.softbee-cf-position-inline .softbee-cf-panel {
    background: var(--softbee-c-surface);
    border: 1px solid var(--softbee-c-border);
    border-radius: var(--softbee-c-radius);
    box-shadow: var(--softbee-c-shadow-sm);
    padding: 24px;
    max-width: 520px;
}

@keyframes softbee-cf-pop {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
    .softbee-cf-position-floating .softbee-cf-panel {
        position: fixed;
        inset: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        padding: 16px;
        overflow-y: auto;
    }
}

/* ----- Launcher button ----- */

.softbee-cf-launcher {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--softbee-c-primary);
    color: #fff;
    border: none;
    padding: 12px 18px;
    border-radius: 999px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--softbee-c-shadow-sm);
    transition: background 0.15s ease, transform 0.1s ease;
}

.softbee-cf-launcher:hover {
    background: var(--softbee-c-primary-dark);
    transform: translateY(-1px);
}

.softbee-cf-launcher-icon {
    width: 18px;
    height: 18px;
}

/* ----- Close ----- */

.softbee-cf-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: var(--softbee-c-muted);
    padding: 4px 8px;
    border-radius: 4px;
}

.softbee-cf-close:hover {
    background: var(--softbee-c-surface-2);
    color: var(--softbee-c-text);
}

/* ----- Header ----- */

.softbee-cf-header {
    margin-bottom: 16px;
}

.softbee-cf-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--softbee-c-text);
    margin-bottom: 4px;
}

.softbee-cf-subtitle {
    font-size: 13px;
    color: var(--softbee-c-muted);
    line-height: 1.4;
}

/* ----- Form ----- */

.softbee-cf-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.softbee-cf-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.softbee-cf-field-row {
    display: flex;
    gap: 10px;
}

.softbee-cf-field-row .softbee-cf-field {
    flex: 1 1 0;
}

@media (max-width: 420px) {
    .softbee-cf-field-row {
        flex-direction: column;
    }
}

.softbee-cf-field label {
    font-size: 13px;
    font-weight: 500;
    color: var(--softbee-c-text);
    margin: 0;
}

.softbee-cf-optional {
    color: var(--softbee-c-muted);
    font-weight: 400;
    font-size: 12px;
}

.softbee-cf-field input[type="text"],
.softbee-cf-field input[type="email"],
.softbee-cf-field input[type="tel"],
.softbee-cf-field textarea {
    border: 1px solid var(--softbee-c-border-strong);
    background: var(--softbee-c-surface);
    border-radius: var(--softbee-c-radius-sm);
    padding: 9px 12px;
    font-size: 14px;
    font-family: inherit;
    color: var(--softbee-c-text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    width: 100%;
    box-shadow: var(--softbee-c-shadow-sm);
}

.softbee-cf-field input:focus,
.softbee-cf-field textarea:focus {
    outline: none;
    border-color: var(--softbee-c-primary);
    box-shadow: 0 0 0 3px rgba(30, 197, 121, 0.18);
}

.softbee-cf-field textarea {
    resize: vertical;
    min-height: 90px;
}

.softbee-cf-field.softbee-cf-field-error input,
.softbee-cf-field.softbee-cf-field-error textarea {
    border-color: var(--softbee-c-error);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18);
}

.softbee-cf-error {
    color: var(--softbee-c-error);
    font-size: 12px;
    min-height: 0;
}

.softbee-cf-error:empty {
    display: none;
}

/* Honeypot — hide from humans */
.softbee-cf-honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* GDPR checkbox */
.softbee-cf-gdpr {
    margin-top: 4px;
}

.softbee-cf-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--softbee-c-muted);
    line-height: 1.5;
}

.softbee-cf-check input[type="checkbox"] {
    margin-top: 3px;
    accent-color: var(--softbee-c-primary);
}

.softbee-cf-check a {
    color: var(--softbee-c-primary-dark);
}

/* ----- Checkbox group (e.g. preferred call-back times) ----- */

.softbee-cf-checkgroup {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.softbee-cf-checkgroup-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--softbee-c-text);
    margin-bottom: 2px;
}

.softbee-cf-checkgroup .softbee-cf-check {
    color: var(--softbee-c-text);
}

/* ----- Submit ----- */

.softbee-cf-actions {
    margin-top: 6px;
}

.softbee-cf-submit {
    width: 100%;
    background: var(--softbee-c-primary);
    color: #fff;
    border: none;
    border-radius: var(--softbee-c-radius-sm);
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.15s ease, transform 0.1s ease;
}

.softbee-cf-submit:hover {
    background: var(--softbee-c-primary-dark);
}

.softbee-cf-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.softbee-cf-submit-spinner {
    display: none;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: softbee-cf-spin 0.7s linear infinite;
}

.softbee-cf-submit[data-loading="true"] .softbee-cf-submit-spinner {
    display: inline-block;
}

@keyframes softbee-cf-spin {
    to { transform: rotate(360deg); }
}

/* ----- Success / generic error ----- */

.softbee-cf-success {
    background: rgba(22, 163, 74, 0.1);
    color: var(--softbee-c-success);
    padding: 12px 14px;
    border-radius: var(--softbee-c-radius-sm);
    font-size: 14px;
    font-weight: 500;
    margin-top: 8px;
}

.softbee-cf-generic-error {
    background: rgba(220, 38, 38, 0.1);
    color: var(--softbee-c-error);
    padding: 12px 14px;
    border-radius: var(--softbee-c-radius-sm);
    font-size: 14px;
    margin-top: 8px;
}

/* =========================================================================
 * CONTACT HUB
 * ========================================================================= */

.softbee-ch-position-floating {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 99997;
}

.softbee-ch-position-floating .softbee-ch-panel {
    position: absolute;
    right: 0;
    bottom: 72px;
    width: 360px;
    max-width: calc(100vw - 40px);
    background: var(--softbee-c-surface);
    border-radius: var(--softbee-c-radius);
    box-shadow: var(--softbee-c-shadow-md);
    padding: 20px;
    display: none;
}

.softbee-ch-position-floating .softbee-ch-panel[data-open="true"] {
    display: block;
    animation: softbee-cf-pop 0.18s ease-out;
}

.softbee-ch-position-inline {
    position: relative;
    display: inline-block;
}

.softbee-ch-position-inline .softbee-ch-panel {
    background: var(--softbee-c-surface);
    border: 1px solid var(--softbee-c-border);
    border-radius: var(--softbee-c-radius);
    box-shadow: var(--softbee-c-shadow-md);
    padding: 20px;
    margin-top: 12px;
    display: none;
    width: 360px;
    max-width: calc(100vw - 20px);
    position: relative;
}

.softbee-ch-position-inline .softbee-ch-panel[data-open="true"] {
    display: block;
}

@media (max-width: 480px) {
    .softbee-ch-position-floating .softbee-ch-panel {
        position: fixed;
        inset: 20px;
        width: auto;
        max-width: none;
        overflow-y: auto;
    }
}

/* Launcher */

.softbee-ch-launcher {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--softbee-c-text);
    color: #fff;
    border: none;
    padding: 12px 18px;
    border-radius: 999px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--softbee-c-shadow-md);
    transition: background 0.15s ease, transform 0.1s ease;
}

.softbee-ch-launcher:hover {
    background: #000;
    transform: translateY(-1px);
}

.softbee-ch-launcher-icon {
    width: 18px;
    height: 18px;
}

.softbee-ch-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: var(--softbee-c-muted);
    padding: 4px 8px;
    border-radius: 4px;
}

.softbee-ch-close:hover {
    background: var(--softbee-c-surface-2);
    color: var(--softbee-c-text);
}

.softbee-ch-header {
    margin-bottom: 14px;
    padding-right: 30px;
}

.softbee-ch-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--softbee-c-text);
    margin-bottom: 4px;
}

.softbee-ch-subtitle {
    font-size: 13px;
    color: var(--softbee-c-muted);
}

/* Channels */

.softbee-ch-channels {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.softbee-ch-channel {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--softbee-c-surface);
    border: 1px solid var(--softbee-c-border);
    border-radius: var(--softbee-c-radius-sm);
    padding: 12px 14px;
    text-decoration: none;
    color: var(--softbee-c-text);
    transition: all 0.15s ease;
    cursor: pointer;
}

.softbee-ch-channel:hover {
    border-color: var(--softbee-c-primary);
    background: var(--softbee-c-surface-2);
    transform: translateX(2px);
    text-decoration: none;
    color: var(--softbee-c-text);
}

.softbee-ch-channel-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    background: var(--softbee-c-text);
}

.softbee-ch-channel-icon svg {
    width: 20px;
    height: 20px;
}

.softbee-ch-channel-whatsapp .softbee-ch-channel-icon {
    background: #25d366;
}

.softbee-ch-channel-form .softbee-ch-channel-icon {
    background: var(--softbee-c-primary);
}

.softbee-ch-channel-phone .softbee-ch-channel-icon {
    background: #3b82f6;
}

.softbee-ch-channel-callback .softbee-ch-channel-icon {
    background: #8b5cf6;
}

.softbee-ch-channel-leadtool .softbee-ch-channel-icon {
    background: var(--softbee-c-primary-dark);
}

.softbee-ch-channel-text {
    flex: 1;
    min-width: 0;
}

.softbee-ch-channel-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--softbee-c-text);
}

.softbee-ch-channel-desc {
    display: block;
    font-size: 12px;
    color: var(--softbee-c-muted);
    margin-top: 2px;
}

.softbee-ch-channel-arrow {
    font-size: 24px;
    color: var(--softbee-c-muted);
    flex-shrink: 0;
    line-height: 1;
}

/* Embedded form inside hub */

.softbee-ch-form-wrap {
    margin-top: 4px;
}

.softbee-ch-form-back {
    background: transparent;
    border: none;
    color: var(--softbee-c-primary-dark);
    font-size: 13px;
    cursor: pointer;
    padding: 4px 0;
    margin-bottom: 8px;
    font-weight: 500;
}

.softbee-ch-form-back:hover {
    text-decoration: underline;
}

/* When showing form inside hub, hide channel list. */
.softbee-ch-panel[data-view="form"] .softbee-ch-channels,
.softbee-ch-panel[data-view="form"] .softbee-ch-header,
.softbee-ch-panel[data-view="callback"] .softbee-ch-channels,
.softbee-ch-panel[data-view="callback"] .softbee-ch-header {
    display: none;
}

.softbee-ch-panel[data-view="channels"] .softbee-ch-form-wrap,
.softbee-ch-panel[data-view="channels"] .softbee-ch-callback-wrap {
    display: none;
}

/* Embedded callback form inside hub */

.softbee-ch-callback-wrap {
    margin-top: 4px;
}

.softbee-ch-callback-wrap .softbee-cf-panel {
    border: none;
    box-shadow: none;
    padding: 0;
    background: transparent;
}

/* Hide form's own panel chrome inside hub. */
.softbee-ch-form-wrap .softbee-cf-panel {
    border: none;
    box-shadow: none;
    padding: 0;
    background: transparent;
}
