/**
 * Intelligent Hint System - Floating button + Sidebar panel
 */

/* ===== Floating Button ===== */
.hint-float-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 900;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
    transition: all 0.3s ease;
    border: none;
}

.hint-float-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(245, 158, 11, 0.5);
}

.hint-float-btn.pulse {
    animation: hintPulse 1.5s ease-in-out infinite;
}

@keyframes hintPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
    }
    50% {
        transform: scale(1.15);
        box-shadow: 0 6px 30px rgba(245, 158, 11, 0.6);
    }
}

/* ===== Sidebar Panel ===== */
.hint-panel {
    position: fixed;
    top: 0;
    right: -380px;
    width: 360px;
    height: 100vh;
    background: var(--darker);
    border-left: 1px solid var(--border);
    z-index: 950;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.3);
}

.hint-panel.active {
    right: 0;
}

/* Panel Header */
.hint-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: var(--card);
}

.hint-panel-title {
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
}

.hint-panel-title i {
    color: #f59e0b;
}

.hint-panel-close {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.hint-panel-close:hover {
    color: #ef4444;
    border-color: #ef4444;
}

/* Panel Body */
.hint-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.hint-panel-body::-webkit-scrollbar {
    width: 4px;
}

.hint-panel-body::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

/* Welcome */
.hint-welcome {
    text-align: center;
    padding: 1.5rem 0.5rem;
    color: var(--text-muted);
}

.hint-welcome p {
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.hint-welcome ul {
    list-style: none;
    text-align: left;
    padding: 0;
}

.hint-welcome ul li {
    padding: 0.4rem 0;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hint-welcome ul li i {
    color: #f59e0b;
    width: 18px;
    text-align: center;
}

/* Context Info */
.hint-context-info {
    text-align: center;
    padding: 1rem;
}

.hint-context-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.75rem;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: var(--radius-full);
    color: #00ff88;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.hint-context-info p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Messages */
.hint-message {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: var(--radius);
    animation: hintMsgIn 0.3s ease;
}

@keyframes hintMsgIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.hint-hint {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.15);
}

.hint-info {
    background: rgba(14, 165, 233, 0.08);
    border: 1px solid rgba(14, 165, 233, 0.15);
}

.hint-warning {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.15);
}

.hint-error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.hint-loading {
    background: var(--card);
    border: 1px solid var(--border);
}

.hint-msg-icon {
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.hint-msg-content {
    flex: 1;
    min-width: 0;
}

.hint-msg-content p {
    font-size: 0.85rem;
    color: var(--text);
    line-height: 1.5;
    margin: 0;
}

.hint-level-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border-radius: var(--radius-full);
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Panel Actions */
.hint-panel-actions {
    padding: 0.75rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    background: var(--card);
}

.hint-action-btn {
    flex: 1;
    min-width: calc(33% - 0.3rem);
    padding: 0.5rem;
    background: var(--darker);
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    transition: all 0.2s;
}

.hint-action-btn:hover {
    border-color: #f59e0b;
    color: #f59e0b;
}

.hint-action-btn.secondary {
    min-width: 100%;
    background: rgba(14, 165, 233, 0.08);
    border-color: rgba(14, 165, 233, 0.2);
    color: #0ea5e9;
}

.hint-action-btn.secondary:hover {
    border-color: #0ea5e9;
    background: rgba(14, 165, 233, 0.15);
}

.hint-action-btn.used {
    opacity: 0.4;
    cursor: not-allowed;
    border-style: dashed;
}

/* Skill Profile */
.hint-skill-profile {
    margin-bottom: 1rem;
}

.hint-skill-profile h4,
.hint-recs h4 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text);
}

.hint-skill-profile h4 i { color: #a855f7; }
.hint-recs h4 i { color: #0ea5e9; }

.hint-skills {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.hint-skill-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hint-skill-name {
    font-size: 0.75rem;
    color: var(--text-muted);
    min-width: 70px;
    text-transform: capitalize;
}

.hint-skill-bar {
    flex: 1;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.hint-skill-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.hint-skill-pct {
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-mono);
    min-width: 35px;
    text-align: right;
}

/* Recommendations */
.hint-recs {
    margin-top: 0.5rem;
}

.hint-rec-item {
    padding: 0.6rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.4rem;
    cursor: pointer;
    transition: all 0.2s;
}

.hint-rec-item:hover {
    border-color: var(--primary);
}

.hint-rec-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.2rem;
}

.hint-rec-reason {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hint-panel {
        width: 100%;
        right: -100%;
    }

    .hint-float-btn {
        bottom: 1rem;
        right: 1rem;
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
}
