/* =====================================================================
   SHARE2INSPIRE - SAMUEL ROLO AI
   Career Coach Assistant Widget - Ultra Minimalist Design
   
   Created: 2026-01-14
   Updated: 2026-01-31 (HIGH CONTRAST FIX - White BG, Dark Text)
   Purpose: Discrete side tab with expandable chat for career guidance
   ===================================================================== */

/* ===== DISCRETE FLOATING BUTTON (Always Visible) ===== */
.coach-agent-tab {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
}

/* Separar o widget de Feedback (assumindo que usa esta classe) */
.feedback-tab {
    position: fixed;
    right: 20px;
    bottom: 90px; /* Posicionar acima do AI Coach */
    z-index: 9999;
}

.coach-tab-button {
    width: 56px;
    height: 56px;
    background: #ffffff;
    color: #BF9A33;
    border: 2px solid #BF9A33;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
    position: relative;
    overflow: hidden;
}

.coach-tab-button:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 30px rgba(191, 154, 51, 0.25);
    background: #fffbf0;
}

.coach-tab-button:active {
    transform: scale(0.95);
}

.coach-tab-button span {
    display: none; /* Hide text, icon only */
}

.coach-tab-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
}

/* Online indicator pulse */
.coach-tab-pulse {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 10px;
    height: 10px;
    background: #4CAF50;
    border-radius: 50%;
    border: 2px solid #ffffff;
    animation: pulse-soft 2s infinite;
}

@keyframes pulse-soft {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

/* ===== CHAT WIDGET CONTAINER ===== */
#coachChatWidget,
.coach-chat-widget {
    position: fixed;
    right: 20px;
    bottom: 90px;
    width: 380px;
    max-height: 520px;
    background-color: #ffffff !important;
    border-radius: 16px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.12);
    z-index: 9998;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

#coachChatWidget.active,
.coach-chat-widget.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Expanded mode */
#coachChatWidget.expanded,
.coach-chat-widget.expanded {
    width: 480px;
    max-height: 680px;
    bottom: 20px;
    right: 20px;
}

/* Maximize Mode */
#coachChatWidget.maximized,
.coach-chat-widget.maximized {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    bottom: 0;
    right: 0;
    border-radius: 0;
    box-shadow: none;
}

/* ===== CHAT HEADER ===== */
#coachChatWidget .coach-chat-header,
.coach-chat-header {
    background-color: #ffffff !important;
    color: #1A1A1A !important;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    border-bottom: 1px solid #e0e0e0;
}

.coach-chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.coach-avatar {
    width: 36px;
    height: 36px;
    background: #BF9A33;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #1A1A1A !important;
    font-weight: 700;
    letter-spacing: -0.5px;
}

#coachChatWidget .coach-header-text h3,
.coach-header-text h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #1A1A1A !important;
    letter-spacing: 0.3px;
}

#coachChatWidget .coach-header-text p,
.coach-header-text p {
    margin: 2px 0 0 0;
    font-size: 11px;
    color: #333333 !important;
    display: flex;
    align-items: center;
    gap: 4px;
}

.coach-header-text p::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #4CAF50;
    border-radius: 50%;
}

.coach-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

#coachChatWidget .coach-expand-btn,
#coachChatWidget .coach-maximize-btn,
#coachChatWidget .coach-close-btn,
.coach-expand-btn,
.coach-maximize-btn,
.coach-close-btn {
    background: transparent;
    border: none;
    color: #333333 !important;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 4px;
    line-height: 1;
    border-radius: 4px;
}

.coach-expand-btn:hover,
.coach-maximize-btn:hover,
.coach-close-btn:hover {
    color: #BF9A33 !important;
    background: rgba(191, 154, 51, 0.1);
}

/* ===== CHAT MESSAGES AREA ===== */
#coachChatWidget #coachChatMessages,
#coachChatMessages,
.coach-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background-color: #ffffff !important;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 200px;
}

.coach-message {
    display: flex;
    gap: 8px;
    animation: fadeSlideIn 0.25s ease;
}

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

.coach-message.bot,
.coach-message.coach-message-bot,
.coach-message-bot {
    flex-direction: row;
}

.coach-message.user,
.coach-message.coach-message-user,
.coach-message-user {
    flex-direction: row-reverse;
}

.coach-message-avatar {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #BF9A33;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #1A1A1A !important;
    font-weight: 700;
    flex-shrink: 0;
}

.coach-message.user .coach-message-avatar,
.coach-message.coach-message-user .coach-message-avatar,
.coach-message-user .coach-message-avatar {
    background: #BF9A33;
    color: #1A1A1A !important;
}

/* ===== MESSAGE CONTENT - HIGH CONTRAST ===== */
#coachChatWidget .coach-message-content,
.coach-message-content {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
    font-family: 'Poppins', sans-serif;
    background-color: #ffffff !important;
    color: #1A1A1A !important;
}

/* Bot messages - White background with dark text */
#coachChatWidget .coach-message-bot .coach-message-content,
#coachChatWidget .coach-message.coach-message-bot .coach-message-content,
.coach-message.bot .coach-message-content,
.coach-message.coach-message-bot .coach-message-content,
.coach-message-bot .coach-message-content {
    background-color: #ffffff !important;
    color: #1A1A1A !important;
    border: 1px solid #d0d0d0;
    border-top-left-radius: 4px;
}

/* User messages - Gold background with dark text */
#coachChatWidget .coach-message-user .coach-message-content,
#coachChatWidget .coach-message.coach-message-user .coach-message-content,
.coach-message.user .coach-message-content,
.coach-message.coach-message-user .coach-message-content,
.coach-message-user .coach-message-content {
    background-color: #BF9A33 !important;
    color: #1A1A1A !important;
    border-top-right-radius: 4px;
}

/* Ensure all text inside messages is DARK - Maximum specificity */
#coachChatWidget .coach-message-content,
#coachChatWidget .coach-message-content *,
#coachChatWidget .coach-message-content p,
#coachChatWidget .coach-message-content span,
#coachChatWidget .coach-message-content div,
.coach-message-content,
.coach-message-content *,
.coach-message-content p,
.coach-message-content span,
.coach-message-content div {
    color: #1A1A1A !important;
}

#coachChatWidget .coach-message-content strong,
.coach-message-content strong {
    color: #1A1A1A !important;
    font-weight: 700;
}

#coachChatWidget .coach-message-content em,
.coach-message-content em {
    color: #1A1A1A !important;
}

#coachChatWidget .coach-message-content a,
.coach-message-content a {
    color: #8B6914 !important;
    text-decoration: underline;
}

/* ===== TYPING INDICATOR ===== */
.coach-typing,
.coach-typing-indicator,
.coach-message-typing .coach-message-content {
    display: flex;
    gap: 4px;
    padding: 10px 14px;
    background-color: #f5f5f5 !important;
    border-radius: 12px;
    border-top-left-radius: 4px;
    width: fit-content;
    border: 1px solid #e0e0e0;
}

.coach-typing span,
.coach-typing-indicator span {
    width: 6px;
    height: 6px;
    background-color: #BF9A33 !important;
    border-radius: 50%;
    animation: typing 1.2s infinite;
}

.coach-typing span:nth-child(2),
.coach-typing-indicator span:nth-child(2) { animation-delay: 0.15s; }
.coach-typing span:nth-child(3),
.coach-typing-indicator span:nth-child(3) { animation-delay: 0.3s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-4px); opacity: 1; }
}

/* ===== CHAT INPUT AREA ===== */
#coachChatWidget .coach-chat-input-area,
.coach-chat-input-area {
    padding: 12px 16px 16px;
    background-color: #ffffff !important;
    border-top: 1px solid #e0e0e0;
    flex-shrink: 0;
}

#coachChatWidget .coach-quick-actions,
.coach-quick-actions {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

#coachChatWidget .coach-quick-action,
.coach-quick-action {
    padding: 5px 10px;
    background-color: #ffffff !important;
    border: 1px solid #d0d0d0;
    border-radius: 16px;
    font-size: 11px;
    color: #1A1A1A !important;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Poppins', sans-serif;
}

#coachChatWidget .coach-quick-action:hover,
.coach-quick-action:hover {
    border-color: #BF9A33;
    color: #BF9A33 !important;
    background-color: rgba(191, 154, 51, 0.05) !important;
}

.coach-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
}

#coachChatWidget #coachChatInput,
#coachChatInput,
.coach-chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #d0d0d0;
    border-radius: 24px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.2s ease;
    outline: none;
    background-color: #ffffff !important;
    color: #1A1A1A !important;
}

#coachChatWidget #coachChatInput:focus,
#coachChatInput:focus,
.coach-chat-input:focus {
    border-color: #BF9A33;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(191, 154, 51, 0.1);
}

#coachChatWidget #coachChatInput::placeholder,
#coachChatInput::placeholder,
.coach-chat-input::placeholder {
    color: #666666 !important;
}

#coachChatWidget #coachSendBtn,
#coachSendBtn,
.coach-send-btn {
    width: 44px;
    height: 44px;
    background-color: #BF9A33 !important;
    border: none;
    border-radius: 50%;
    color: #1A1A1A !important;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#coachChatWidget #coachSendBtn:hover,
#coachSendBtn:hover,
.coach-send-btn:hover {
    background-color: #1A1A1A !important;
    color: #BF9A33 !important;
    transform: scale(1.05);
}

.coach-send-btn:active {
    transform: scale(0.95);
}

/* ===== SCROLLBAR ===== */
.coach-chat-messages::-webkit-scrollbar {
    width: 4px;
}

.coach-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.coach-chat-messages::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 4px;
}

.coach-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #BF9A33;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    #coachChatWidget,
    .coach-chat-widget {
        width: calc(100vw - 40px);
        max-height: calc(100vh - 140px);
        right: 20px;
        bottom: 90px;
    }
    
    #coachChatWidget.expanded,
    .coach-chat-widget.expanded {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 100px);
        right: 10px;
        bottom: 80px;
    }
    
    #coachChatWidget.maximized,
    .coach-chat-widget.maximized {
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        bottom: 0;
        right: 0;
        border-radius: 0;
        box-shadow: none;
    }
    
    .coach-tab-button {
        width: 50px;
        height: 50px;
    }
    
    .coach-tab-icon {
        font-size: 18px;
    }
}

/* ===== FORCE LIGHT MODE - OVERRIDE DARK MODE ===== */
/* Desativar dark mode para garantir sempre fundo branco e letras escuras */
@media (prefers-color-scheme: dark) {
    #coachChatWidget,
    .coach-chat-widget {
        background-color: #ffffff !important;
        border-color: #e0e0e0 !important;
    }
    
    #coachChatWidget .coach-chat-header,
    .coach-chat-header {
        background-color: #ffffff !important;
        color: #1A1A1A !important;
    }
    
    #coachChatWidget .coach-header-text h3,
    .coach-header-text h3 {
        color: #1A1A1A !important;
    }
    
    #coachChatWidget .coach-header-text p,
    .coach-header-text p {
        color: #333333 !important;
    }
    
    #coachChatWidget #coachChatMessages,
    #coachChatMessages,
    .coach-chat-messages {
        background-color: #ffffff !important;
    }
    
    #coachChatWidget .coach-message-content,
    #coachChatWidget .coach-message-content *,
    .coach-message-content,
    .coach-message-content * {
        color: #1A1A1A !important;
    }
    
    #coachChatWidget .coach-message-bot .coach-message-content,
    .coach-message.bot .coach-message-content,
    .coach-message.coach-message-bot .coach-message-content,
    .coach-message-bot .coach-message-content {
        background-color: #ffffff !important;
        color: #1A1A1A !important;
        border-color: #d0d0d0 !important;
    }
    
    #coachChatWidget .coach-message-user .coach-message-content,
    .coach-message.user .coach-message-content,
    .coach-message.coach-message-user .coach-message-content,
    .coach-message-user .coach-message-content {
        background-color: #BF9A33 !important;
        color: #1A1A1A !important;
    }
    
    #coachChatWidget .coach-chat-input-area,
    .coach-chat-input-area {
        background-color: #ffffff !important;
        border-color: #e0e0e0 !important;
    }
    
    #coachChatWidget #coachChatInput,
    #coachChatInput,
    .coach-chat-input {
        background-color: #ffffff !important;
        border-color: #d0d0d0 !important;
        color: #1A1A1A !important;
    }
    
    #coachChatWidget #coachChatInput::placeholder,
    #coachChatInput::placeholder,
    .coach-chat-input::placeholder {
        color: #666666 !important;
    }
    
    #coachChatWidget .coach-quick-action,
    .coach-quick-action {
        background-color: #ffffff !important;
        border-color: #d0d0d0 !important;
        color: #1A1A1A !important;
    }
    
    #coachChatWidget .coach-expand-btn,
    #coachChatWidget .coach-maximize-btn,
    #coachChatWidget .coach-close-btn,
    .coach-expand-btn,
    .coach-maximize-btn,
    .coach-close-btn {
        color: #333333 !important;
    }
}

/* Updated: 20260131-v2 - Force white background and dark text for maximum contrast with ID selectors */
