/* =========================================
   1. Variables & Reset
   ========================================= */
:root {
    --eff-primary: #e67e22;       /* Orange Efficience */
    --eff-primary-dark: #d35400;
    --eff-secondary: #27ae60;     /* Vert Action */
    --eff-text: #2c3e50;
    --eff-bg: #ffffff;
    --eff-gray: #f8f9fa;
    --eff-shadow: 0 8px 24px rgba(0,0,0,0.12);
    --eff-radius: 12px;
}

#efficience-widget-root * {
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* =========================================
   2. Main Widget Container
   ========================================= */
.eff-widget-container {
    position: fixed;
    z-index: 99999;
    bottom: 20px;
    right: 20px;
    width: 380px;
    height: 600px;
    max-height: calc(100vh - 40px);
    background: var(--eff-bg);
    border-radius: var(--eff-radius);
    box-shadow: var(--eff-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
}

.eff-widget-container.is-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* =========================================
   3. Chat Bubble & Header
   ========================================= */
.eff-widget-header {
    background: linear-gradient(135deg, var(--eff-primary), #f39c12);
    color: white;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.eff-chat-bubble {
    padding: 12px 16px;
    background: var(--eff-gray);
    border-radius: 0 12px 12px 12px;
    margin-bottom: 12px;
    color: var(--eff-text);
    font-size: 14px;
    line-height: 1.5;
    animation: fadeIn 0.4s ease forwards;
}

.eff-chat-bubble.user {
    background: var(--eff-primary);
    color: white;
    border-radius: 12px 0 12px 12px;
    align-self: flex-end;
}

/* =========================================
   4. Recommendation Cards
   ========================================= */
.eff-service-card {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 12px;
    margin-top: 8px;
    transition: all 0.2s;
    cursor: pointer;
}

.eff-service-card:hover {
    border-color: var(--eff-secondary);
    background: #f0fff4;
}

.eff-score-badge {
    background: var(--eff-secondary);
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
}

/* =========================================
   5. Floating Trigger Button
   ========================================= */
.eff-trigger-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--eff-primary);
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.4);
    cursor: pointer;
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    transition: transform 0.2s;
}

.eff-trigger-btn:hover {
    transform: scale(1.1);
}

/* =========================================
   6. Animations
   ========================================= */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   7. Mobile Responsive
   ========================================= */
@media (max-width: 480px) {
    .eff-widget-container {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }
}
