/* =================================
   Coach Helper Widget
================================= */
.coach-helper-feature-nudge {
    position: fixed;
    bottom: 92px;
    right: 20px;
    max-width: 260px;
    background: #111827;
    color: #fff;
    padding: 10px 42px 10px 12px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    font-size: 13px;
    z-index: 9997;
    cursor: pointer;
    animation: fadeInUp 0.25s ease;
    pointer-events: auto;
}
.coach-helper-feature-nudge.wiggle { animation: fadeInUp 0.25s ease, shakeMe 0.6s ease; }
.coach-helper-feature-nudge strong { color: #22c55e; }
.coach-helper-feature-announcement { border-left: 3px solid #22c55e; }

.nudge-close {
    position: absolute;
    top: 0;
    right: 0;
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 14px;
    cursor: pointer;
    z-index: 10000;
    padding: 10px 14px;
}
.nudge-close:hover { color: #fff; }

@keyframes shakeMe {
    0%,100% { transform: translate3d(0,0,0); }
    20%,60% { transform: translate3d(-5px,0,0); }
    40%,80% { transform: translate3d(5px,0,0); }
}

.coach-helper-fab {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9998;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 999px;
    background: var(--primary);
    color: var(--nav-text);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 10px 25px rgba(0,0,0,0.18);
    cursor: pointer;
    user-select: none;
    border: 0;
    pointer-events: auto;
}
.coach-helper-fab:hover { background: var(--primary-dark); }

.coach-helper-widget {
    position: fixed;
    right: 20px;
    bottom: 76px;
    width: 360px;
    max-width: calc(100vw - 24px);
    height: 100vh;
    max-height: calc(100vh - 90px);
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 16px;
    box-shadow: 0 20px 45px rgba(0,0,0,0.2);
    z-index: 9999;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(16px) scale(0.98);
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}
.coach-helper-widget.is-open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; visibility: visible; }

.coach-helper-header { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 8px 14px 12px; background: #f9fafb; border-bottom: 1px solid #e5e7eb; }
.coach-helper-top { display: flex; flex-direction: column; width: 100%; }
.coach-helper-drag-handle { width: 42px; height: 5px; border-radius: 999px; background: #d1d5db; margin: 0 auto 10px; cursor: grab; touch-action: none; }
.coach-helper-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.coach-helper-title { font-weight: 700; color: #111827; min-width: 0; }
.coach-helper-close { border: 0; background: transparent; font-size: 22px; line-height: 1; cursor: pointer; color: #6b7280; flex-shrink: 0; }
.coach-helper-close:hover { background: transparent; color: var(--primary); }

.coach-helper-messages { flex: 1 1 auto; min-height: 0; padding: 12px; background: #f9fafb; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.coach-helper-user,
.coach-helper-bot { padding: 10px 12px; border-radius: 12px; margin-bottom: 10px; line-height: 1.45; font-size: 14px; word-break: break-word; }
.coach-helper-user { background: #dbeafe; color: #1e3a8a; margin-left: 36px; }
.coach-helper-bot { background: #ecfdf5; color: #065f46; margin-right: 36px; }
.coach-helper-action-link { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 700; color: #2563eb; text-decoration: none; }
.coach-helper-action-link:hover { text-decoration: underline; }

.coach-helper-quick-actions { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-top: 1px solid #e5e7eb; background: #fff; max-height: 160px; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; white-space: nowrap; }
.coach-helper-quick-actions .coach-helper-quick { width: 100%; text-align: left; }
.coach-helper-form { flex: 0 0 auto; display: flex; gap: 8px; padding: 12px; border-top: 1px solid #e5e7eb; background: #fff; }
.coach-helper-input { flex: 1 1 auto; min-width: 0; font-size: 16px; }
