/* SmartLab AI InfoPoint - public interface */

/* Base modal */
.opensmartbot-modal {
    --opensmartbot-primary-color: var(--opensmartbot-primary, #1f6f8b);
    --opensmartbot-primary-dark: #15566c;
    --opensmartbot-text: #172033;
    --opensmartbot-muted: #52606d;
    --opensmartbot-border: #dde5ed;
    --opensmartbot-soft: #f7fafc;
    --opensmartbot-focus: rgba(31, 111, 139, 0.34);
    --opensmartbot-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
    position: fixed !important;
    right: 24px !important;
    bottom: 104px !important;
    width: min(432px, calc(100vw - 32px)) !important;
    z-index: 999999 !important;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    color: var(--opensmartbot-text) !important;
}

.opensmartbot-card {
    position: relative;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 10px;
    box-shadow: var(--opensmartbot-shadow);
}

/* Launcher and close button */
.opensmartbot-launcher {
    filter: drop-shadow(0 14px 28px rgba(15, 23, 42, 0.24));
    transition: transform 0.18s ease, filter 0.18s ease;
}

.opensmartbot-launcher:hover {
    transform: translateY(-2px);
    filter: drop-shadow(0 18px 34px rgba(15, 23, 42, 0.28));
}

.opensmartbot-close {
    position: absolute;
    top: 10px;
    right: 12px;
    z-index: 2;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    border: 1px solid rgba(15, 23, 42, 0.10) !important;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92) !important;
    color: var(--opensmartbot-text) !important;
    box-shadow: none !important;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

.opensmartbot-close:hover,
.opensmartbot-close:active {
    background: #ffffff !important;
    color: var(--opensmartbot-text) !important;
}

/* Keyboard focus */
.opensmartbot-launcher:focus-visible,
.opensmartbot-close:focus-visible,
.opensmartbot-primary:focus-visible,
#opensmartbot-email:focus-visible,
.opensmartbot-checkbox input:focus-visible {
    outline: 3px solid var(--opensmartbot-focus) !important;
    outline-offset: 3px;
}

/* Header */
.opensmartbot-header {
    min-height: 126px;
    padding: 22px 24px;
    background: linear-gradient(135deg, var(--opensmartbot-primary-color), #244152);
    background-size: cover;
    background-position: center;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
}

.opensmartbot-logo {
    max-width: 150px;
    max-height: 54px;
    object-fit: contain;
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.90);
    border-radius: 8px;
    padding: 8px;
}

.opensmartbot-logo-text {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
}

.opensmartbot-identity {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.opensmartbot-identity strong {
    color: #ffffff;
    font-size: 26px;
    font-weight: 850;
    line-height: 1;
    letter-spacing: 0;
}

.opensmartbot-header span,
.opensmartbot-identity span {
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
}

/* Steps and copy */
.opensmartbot-step {
    display: none;
    padding: 24px;
}

.opensmartbot-step.is-active {
    display: block;
}

.opensmartbot-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.opensmartbot-kicker {
    margin: 0 0 8px !important;
    color: var(--opensmartbot-primary-color) !important;
    font-size: 12px !important;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.opensmartbot-step h2 {
    margin: 0 0 10px;
    color: var(--opensmartbot-text);
    font-size: 30px;
    line-height: 1.2;
}

.opensmartbot-subtitle {
    margin: -4px 0 12px !important;
    color: #334e68 !important;
    font-size: 16px !important;
    font-weight: 800;
    line-height: 1.35 !important;
}

.opensmartbot-step p {
    margin: 0 0 14px;
    color: var(--opensmartbot-muted);
    font-size: 15px;
    line-height: 1.55;
}

/* Informative cards */
.opensmartbot-services {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 18px 0 24px;
}

.opensmartbot-service-card {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    min-height: 58px;
    gap: 10px;
    padding: 11px 12px;
    border: 1px solid var(--opensmartbot-border);
    border-radius: 10px;
    background: var(--opensmartbot-soft);
    box-shadow: 0 5px 14px rgba(15, 23, 42, 0.06);
    color: #243b53;
    cursor: default;
    user-select: none;
}

.opensmartbot-service-card svg {
    display: block !important;
    flex: 0 0 28px !important;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;
    padding: 5px !important;
    border-radius: 8px;
    background: rgba(31, 111, 139, 0.10);
    color: var(--opensmartbot-primary-color) !important;
    stroke: currentColor !important;
    stroke-width: 1.9 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    fill: none !important;
    box-sizing: border-box;
}

.opensmartbot-service-card svg *,
.opensmartbot-service-card svg path,
.opensmartbot-service-card svg circle {
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: inherit !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}

.opensmartbot-service-card strong {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #243b53 !important;
    box-shadow: none !important;
    font-size: 14px !important;
    font-weight: 700;
    line-height: 1.25;
}

/* Primary actions */
.opensmartbot-primary {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    min-height: 48px;
    padding: 14px 20px !important;
    border: 1px solid var(--opensmartbot-primary-color) !important;
    border-radius: 8px;
    background: var(--opensmartbot-primary-color) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    box-shadow: none !important;
    cursor: pointer;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0;
    text-align: center;
    text-decoration: none !important;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, opacity 0.16s ease;
}

.opensmartbot-modal button.opensmartbot-primary,
.opensmartbot-modal .opensmartbot-primary,
body .opensmartbot-modal button.opensmartbot-primary {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

.opensmartbot-primary-main {
    min-height: 54px;
    font-size: 15px;
}

.opensmartbot-primary:hover:not(:disabled) {
    background: var(--opensmartbot-primary-dark) !important;
    border-color: var(--opensmartbot-primary-dark) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18) !important;
}

.opensmartbot-primary:active:not(:disabled) {
    background: var(--opensmartbot-primary-dark) !important;
    border-color: var(--opensmartbot-primary-dark) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    transform: translateY(0);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.14) !important;
}

.opensmartbot-primary:focus {
    background: var(--opensmartbot-primary-color) !important;
    border-color: var(--opensmartbot-primary-color) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

.opensmartbot-primary:disabled {
    background: #6b7780 !important;
    border-color: #6b7780 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    box-shadow: none !important;
    cursor: not-allowed;
    opacity: 1;
    transform: none;
}

/* Forms and messages */
.opensmartbot-checklist {
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
}

.opensmartbot-checklist li {
    margin: 8px 0;
    padding-left: 28px;
    position: relative;
    color: #334e68;
}

.opensmartbot-checklist li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--opensmartbot-primary-color);
    font-weight: 800;
}

.opensmartbot-checkbox {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 16px 0;
    color: #334e68;
}

.opensmartbot-checkbox input {
    min-width: 18px;
    min-height: 18px;
}

.opensmartbot-label {
    display: block;
    margin: 10px 0 6px;
    color: #334e68;
    font-weight: 700;
}

#opensmartbot-email {
    width: 100% !important;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 12px 14px !important;
    font-size: 15px;
    background-color: #ffffff;
    color: var(--opensmartbot-text);
}

.opensmartbot-message {
    margin: 12px 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--opensmartbot-soft);
    font-size: 14px;
}

/* Loading */
.opensmartbot-loading {
    text-align: center;
    padding: 34px 28px;
}

.opensmartbot-spinner {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 4px solid #d9e2ec;
    border-top-color: var(--opensmartbot-primary-color);
    animation: opensmartbot-spin 0.9s linear infinite;
    margin: 0 auto 18px;
}

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

/* Responsive */
@media (max-width: 520px) {
    .opensmartbot-modal {
        right: 16px !important;
        bottom: 88px !important;
    }

    .opensmartbot-step {
        padding: 22px 20px;
    }

    .opensmartbot-services {
        grid-template-columns: 1fr;
    }

    .opensmartbot-service-card,
    .opensmartbot-primary {
        min-height: 52px;
    }
}
