/* RH-ASSISTANT.CSS - Página dedicada do Tira-Dúvidas RH */

/* ==================== CONTAINER ==================== */
.rh-page {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 60px);
    max-width: 860px;
    margin: 0 auto;
    background: var(--color-bg-card);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    border-radius: 16px;
}

/* ==================== HEADER ==================== */
.rh-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    flex-shrink: 0;
    border-radius: 16px 16px 0 0;
}

.rh-page-header-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.rh-page-header-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
}

.rh-page-header-text h1 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 2px 0;
    color: white;
}

.rh-page-header-text p {
    font-size: 13px;
    margin: 0;
    opacity: 0.8;
    color: rgba(255, 255, 255, 0.85);
}

.rh-page-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.rh-page-status-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: rh-pulse 2s ease-in-out infinite;
}

@keyframes rh-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ==================== MESSAGES AREA ==================== */
.rh-page-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rh-page-messages::-webkit-scrollbar {
    width: 4px;
}

.rh-page-messages::-webkit-scrollbar-track {
    background: transparent;
}

.rh-page-messages::-webkit-scrollbar-thumb {
    background: rgba(var(--color-primary-rgb), 0.2);
    border-radius: 4px;
}

/* ==================== WELCOME STATE ==================== */
.rh-page-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    flex: 1;
}

.rh-page-welcome-icon {
    width: 72px;
    height: 72px;
    background: rgba(var(--color-primary-rgb), 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin-bottom: 20px;
}

.rh-page-welcome h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 8px 0;
}

.rh-page-welcome p {
    font-size: 15px;
    color: var(--color-text-light);
    margin: 0 0 28px 0;
    max-width: 480px;
    line-height: 1.5;
}

.rh-page-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    max-width: 560px;
}

.rh-page-suggestion {
    padding: 10px 18px;
    background: #f5f0ff;
    border: 1px solid #e0d4ff;
    border-radius: 20px;
    font-size: 13px;
    color: var(--color-primary);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    font-weight: 500;
}

.rh-page-suggestion:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--color-primary-rgb), 0.25);
}

.rh-page-suggestion:active {
    transform: scale(0.97);
}

/* ==================== MESSAGES ==================== */
.rh-page-msg {
    display: flex;
    gap: 10px;
    max-width: 75%;
    animation: rh-msg-slide 0.3s ease;
}

@keyframes rh-msg-slide {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.rh-page-msg-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.rh-page-msg-bot {
    align-self: flex-start;
}

.rh-page-msg-avatar {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, #f5f0ff, #e0d4ff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.rh-page-msg-user .rh-page-msg-avatar {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    font-size: 14px;
}

.rh-page-msg-content {
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.6;
    border-radius: 16px;
}

.rh-page-msg-bot .rh-page-msg-content {
    background: var(--color-bg);
    color: var(--color-text);
    border-bottom-left-radius: 4px;
}

.rh-page-msg-user .rh-page-msg-content {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    border-bottom-right-radius: 4px;
}

.rh-page-msg-content strong {
    font-weight: 600;
}

.rh-page-msg-bot .rh-page-msg-content strong {
    color: var(--color-primary);
}

.rh-page-msg-content ul,
.rh-page-msg-content ol {
    margin: 6px 0;
    padding-left: 18px;
}

.rh-page-msg-content li {
    margin-bottom: 4px;
}

.rh-page-msg-content p {
    margin: 0 0 8px 0;
}

.rh-page-msg-content p:last-child {
    margin-bottom: 0;
}

/* ==================== TYPING INDICATOR ==================== */
.rh-page-typing .rh-page-msg-content {
    display: flex;
    gap: 5px;
    padding: 16px 20px;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
}

.rh-page-typing-dot {
    width: 8px;
    height: 8px;
    background: #999;
    border-radius: 50%;
    animation: rh-typing-bounce 1.4s ease-in-out infinite;
}

.rh-page-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.rh-page-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes rh-typing-bounce {
    0%, 100% { opacity: 0.3; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-4px); }
}

/* ==================== INPUT AREA ==================== */
.rh-page-input-area {
    display: flex;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--color-border);
    background: var(--color-bg-card);
    flex-shrink: 0;
}

.rh-page-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--color-border);
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--color-bg);
    color: var(--color-text);
}

.rh-page-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.1);
}

.rh-page-input::placeholder {
    color: var(--color-text-light);
}

.rh-page-send {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    border: none;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
}

.rh-page-send:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--color-primary-rgb), 0.3);
}

.rh-page-send:active {
    transform: translateY(0);
}

.rh-page-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ==================== DISCLAIMER ==================== */
.rh-page-disclaimer {
    text-align: center;
    padding: 8px 24px 12px;
    font-size: 11px;
    color: var(--color-text-light);
    opacity: 0.6;
    background: var(--color-bg-card);
    flex-shrink: 0;
    border-radius: 0 0 16px 16px;
}

/* ==================== DARK MODE ==================== */
[data-theme="dark"] .rh-page {
    background: #252525;
}

[data-theme="dark"] .rh-page-header {
    background: linear-gradient(135deg, #4a00b3 0%, #350088 100%);
}

[data-theme="dark"] .rh-page-welcome h2 {
    color: #e0e0e0;
}

[data-theme="dark"] .rh-page-welcome p {
    color: #a0a0a0;
}

[data-theme="dark"] .rh-page-welcome-icon {
    background: rgba(var(--color-primary-rgb), 0.15);
}

[data-theme="dark"] .rh-page-suggestion {
    background: #1a1a2e;
    border-color: #333;
    color: #a855f7;
}

[data-theme="dark"] .rh-page-suggestion:hover {
    background: #6D00FF;
    border-color: #6D00FF;
    color: white;
}

[data-theme="dark"] .rh-page-msg-avatar {
    background: linear-gradient(135deg, #1a1a2e, #252525);
}

[data-theme="dark"] .rh-page-msg-bot .rh-page-msg-content {
    background: #1e1e1e;
    color: #e0e0e0;
}

[data-theme="dark"] .rh-page-msg-bot .rh-page-msg-content strong {
    color: #a855f7;
}

[data-theme="dark"] .rh-page-input-area {
    background: #252525;
    border-color: #333;
}

[data-theme="dark"] .rh-page-input {
    background: #1e1e1e;
    border-color: #444;
    color: #e0e0e0;
}

[data-theme="dark"] .rh-page-input:focus {
    border-color: #6D00FF;
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.15);
}

[data-theme="dark"] .rh-page-input::placeholder {
    color: #666;
}

[data-theme="dark"] .rh-page-disclaimer {
    background: #252525;
    color: #666;
}

[data-theme="dark"] .rh-page-typing-dot {
    background: #666;
}

[data-theme="dark"] .rh-page-messages::-webkit-scrollbar-thumb {
    background: rgba(var(--color-primary-rgb), 0.3);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .rh-page {
        height: calc(100vh - 56px);
        max-width: 100%;
        border-radius: 0;
    }

    .rh-page-header {
        padding: 16px;
        border-radius: 0;
    }

    .rh-page-header-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .rh-page-header-text h1 {
        font-size: 17px;
    }

    .rh-page-messages {
        padding: 16px;
    }

    .rh-page-msg {
        max-width: 88%;
    }

    .rh-page-welcome {
        padding: 24px 16px;
    }

    .rh-page-welcome-icon {
        font-size: 44px;
        width: 60px;
        height: 60px;
    }

    .rh-page-welcome h2 {
        font-size: 18px;
    }

    .rh-page-suggestions {
        flex-direction: column;
    }

    .rh-page-suggestion {
        width: 100%;
        text-align: center;
    }

    .rh-page-input-area {
        padding: 12px 16px;
    }

    .rh-page-disclaimer {
        border-radius: 0;
    }
}
