/* Employee Portal Styles */

/* Welcome Banner */
.welcome-banner {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
}

/* Quick Links */
.quick-link-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.quick-link-card:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    color: inherit;
}

/* Avatar Circle */
.avatar-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Production Stats */
.production-stat {
    padding: 1rem;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.card-header {
    border-bottom: 1px solid #e9ecef;
}

/* List Group Items */
.list-group-item {
    border-left: none;
    border-right: none;
}

.list-group-item:first-child {
    border-top: none;
}

.list-group-item-action:hover {
    background-color: #f8f9fa;
}

/* Chat Widget */
.chat-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
}

.chat-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #0d6efd;
    border: none;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 20px rgba(13, 110, 253, 0.4);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chat-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(13, 110, 253, 0.5);
}

.chat-container {
    position: absolute;
    bottom: 75px;
    right: 0;
    width: 380px;
    height: 500px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    background: #0d6efd;
    color: white;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-session-bar {
    padding: 8px 12px;
    background: #f8f9fa;
    border-bottom: 1px solid #e4e6eb;
}

.chat-session-bar select {
    font-size: 0.85rem;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    background: white;
}

.chat-session-bar select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.15);
}

#new-chat-btn {
    padding: 4px 8px;
    font-size: 0.85rem;
}

#new-chat-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 16px;
    line-height: 1.4;
}

.message p {
    margin: 0;
}

.bot-message {
    background: #f0f2f5;
    color: #1c1e21;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.bot-message p {
    margin-bottom: 0.5rem;
}

.bot-message p:last-child {
    margin-bottom: 0;
}

.bot-message ul {
    margin: 0.5rem 0;
    padding-left: 1.25rem;
}

.bot-message li {
    margin-bottom: 0.25rem;
}

.bot-message li:last-child {
    margin-bottom: 0;
}

.bot-message strong {
    font-weight: 600;
}

/* Source Citations */
.sources-section {
    border-top: 1px solid rgba(0,0,0,0.1) !important;
    margin-top: 8px;
    padding-top: 8px;
}

.sources-list {
    list-style-type: none;
    padding-left: 0 !important;
    margin-top: 4px;
}

.sources-list li {
    font-size: 0.8rem;
    color: #6c757d;
    padding: 3px 0;
}

.sources-list li::before {
    content: "📄 ";
}

.source-link {
    color: #0d6efd;
    text-decoration: none;
}

.source-link:hover {
    text-decoration: underline;
}

.source-page-link {
    color: #6c757d;
    text-decoration: none;
    font-size: 0.75rem;
}

.source-page-link:hover {
    color: #0d6efd;
    text-decoration: underline;
}

.user-message {
    background: #0d6efd;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-input-container {
    padding: 16px;
    border-top: 1px solid #e4e6eb;
    display: flex;
    gap: 10px;
}

.chat-input-container input {
    border-radius: 20px;
    border: 1px solid #e4e6eb;
    padding: 10px 16px;
}

.chat-input-container input:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.chat-input-container button {
    border-radius: 50%;
    width: 42px;
    height: 42px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #90949c;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-8px);
    }
}

/* Topic Suggestion Chips */
.topic-chips {
    padding: 4px 0;
    align-self: flex-start;
    max-width: 90%;
}

.topic-chips small {
    font-size: 0.75rem;
}

.topic-chips-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.topic-chip {
    display: inline-block;
    padding: 5px 12px;
    font-size: 0.78rem;
    background: #e7f1ff;
    color: #0d6efd;
    border: 1px solid #b6d4fe;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.topic-chip:hover {
    background: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

/* Responsive */
@media (max-width: 576px) {
    .chat-container {
        width: calc(100vw - 48px);
        height: calc(100vh - 150px);
        right: -12px;
    }
}

/* Navbar adjustments */
.navbar-brand .badge {
    font-size: 0.65rem;
    font-weight: normal;
    vertical-align: middle;
}

/* Progress bars in stats */
.production-stat .progress {
    border-radius: 3px;
}

/* HR list items icons */
.list-group-item i {
    font-size: 1.25rem;
}

/* Safety card header */
.card-header.bg-warning {
    border-bottom: none;
}
