/*
|--------------------------------------------------------------------------
| Floating Help Button
|--------------------------------------------------------------------------
*/

.utm-help-widget-button {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 50%;
    background: #2563eb;
    color: #ffffff;
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    z-index: 99990;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
    transition:
        transform 0.2s ease,
        background-color 0.2s ease;
}

.utm-help-widget-button:hover {
    transform: translateY(-2px);
    background: #1d4ed8;
}

.utm-help-widget-button:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.35);
    outline-offset: 3px;
}

.utm-help-widget-button {
    position: fixed;

    right: 24px;
    bottom: 24px;

    width: 56px;
    height: 56px;

    padding: 0;
    margin: 0;

    border: none;
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #2563eb;
    color: #fff;

    box-sizing: border-box;

    z-index: 99999;
}

.utm-help-widget-button .dashicons {
    font-size: 24px;

    width: auto;
    height: auto;

    line-height: 1;

    margin: 0;
    padding: 0;

    position: static;

    display: block;
}

/*
|--------------------------------------------------------------------------
| Overlay
|--------------------------------------------------------------------------
*/

.utm-help-widget-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.2);
    z-index: 99991;
}


/*
|--------------------------------------------------------------------------
| Help Panel
|--------------------------------------------------------------------------
*/

.utm-help-widget-panel {
    position: fixed;
    right: 24px;
    bottom: 88px;
    width: min(390px, calc(100vw - 32px));
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 20px 55px rgba(15, 23, 42, 0.24);
    z-index: 99992;

    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(0.98);

    transition:
        opacity 0.2s ease,
        visibility 0.2s ease,
        transform 0.2s ease;
}

.utm-help-widget-panel.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}


/*
|--------------------------------------------------------------------------
| Header
|--------------------------------------------------------------------------
*/

.utm-help-widget-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.utm-help-widget-header h2 {
    margin: 0 0 3px;
    font-size: 20px;
    line-height: 1.3;
    color: #0f172a;
}

.utm-help-widget-header p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}

.utm-help-widget-close {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: #f1f5f9;
    color: #334155;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.utm-help-widget-close:hover {
    background: #e2e8f0;
}


/*
|--------------------------------------------------------------------------
| Content
|--------------------------------------------------------------------------
*/

.utm-help-widget-content {
    padding: 20px;
}

.utm-help-widget-message {
    margin-bottom: 20px;
}

.utm-help-widget-message h3 {
    margin: 0 0 8px;
    font-size: 17px;
    color: #0f172a;
}

.utm-help-widget-message p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #475569;
}


/*
|--------------------------------------------------------------------------
| Links
|--------------------------------------------------------------------------
*/

.utm-help-widget-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.utm-help-widget-primary-link,
.utm-help-widget-secondary-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease;
}

.utm-help-widget-primary-link {
    background: #2563eb;
    color: #ffffff;
}

.utm-help-widget-primary-link:hover {
    background: #1d4ed8;
    color: #ffffff;
}

.utm-help-widget-secondary-link {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
}

.utm-help-widget-secondary-link:hover {
    border-color: #94a3b8;
    background: #f8fafc;
    color: #0f172a;
}

.utm-help-widget-email-link {
    display: block;
    padding-top: 4px;
    text-align: center;
    font-size: 13px;
    color: #2563eb;
    text-decoration: none;
}

.utm-help-widget-email-link:hover {
    text-decoration: underline;
}


/*
|--------------------------------------------------------------------------
| Mobile
|--------------------------------------------------------------------------
*/

@media (max-width: 600px) {

    .utm-help-widget-button {
        right: 16px;
        bottom: 16px;
    }

    .utm-help-widget-panel {
        right: 16px;
        bottom: 80px;
        width: calc(100vw - 32px);
        max-height: calc(100vh - 104px);
    }
}