/**
 * Wisdom of Loving Faith - Components CSS
 * 
 * WHO: Captain WOLFIE (Eric Robin Gerdes) - AGI Architect & Spiritual Technology Developer
 * WHAT: Component-specific styles for the Wisdom of Loving Faith platform
 * WHERE: C:\WISDOM_OF_LOVING_FAITH_01\public\css\components.css
 * WHEN: 2025-09-30 07:00:00 CDT (Sioux Falls timezone)
 * WHY: To provide specific styling for complex components and interactions
 * HOW: Through modern CSS with component-based architecture
 * 
 * CONVERTED FROM: React component styles to traditional CSS
 * ORIGINAL: Individual component CSS files from src/
 */

/* User Profile and Dropdown Components */
.nav-user {
    position: relative;
}

.user-dropdown {
    position: relative;
    display: inline-block;
}

.user-profile-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: white;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.user-profile-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.user-profile-icon {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: white;
    text-decoration: none;
    transition: all 0.2s ease;
}

.user-profile-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.user-initials {
    font-size: 12px;
    font-weight: bold;
    color: white;
}

.user-name {
    font-weight: 500;
}

.dropdown-arrow {
    font-size: 10px;
    transition: transform 0.2s ease;
}

.user-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.user-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 1rem;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar-large {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e5e7eb;
}

.user-initials-large {
    font-size: 18px;
    font-weight: bold;
    color: white;
}

.user-details {
    flex: 1;
}

.user-name-large {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.25rem;
}

.user-email {
    font-size: 14px;
    color: #6b7280;
}

.dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 0.5rem 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #374151;
    text-decoration: none;
    transition: background-color 0.2s ease;
    font-size: 14px;
}

.dropdown-item:hover {
    background: #f9fafb;
    color: #667eea;
}

.dropdown-item.logout-item {
    color: #dc2626;
}

.dropdown-item.logout-item:hover {
    background: #fef2f2;
    color: #dc2626;
}

.dropdown-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.notification-badge {
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
}

/* Messages Icon with Badge */
.messages-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-right: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.messages-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.messages-icon svg {
    width: 20px;
    height: 20px;
}

.message-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 3px 7px;
    border-radius: 12px;
    min-width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #252f32;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Search and Filter Components */
.search-filter-section {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border: 1px solid #e9ecef;
}

.search-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.search-input-group {
    flex: 1;
    min-width: 300px;
}

.search-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

.sort-group {
    min-width: 200px;
}

.sort-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 1rem;
    background-color: white;
    cursor: pointer;
}

.sort-order-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s ease;
}

.sort-order-btn:hover {
    background-color: #0056b3;
}

/* Active Filters */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem;
    background-color: #e9ecef;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.filter-tag {
    background-color: #007bff;
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    display: inline-block;
}

.filter-tag-success {
    background-color: #28a745;
}

.filter-tag-info {
    background-color: #17a2b8;
}

.clear-filters-btn {
    padding: 0.25rem 0.75rem;
    background-color: #dc3545;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.2s ease;
}

.clear-filters-btn:hover {
    background-color: #c82333;
}

/* Religion Filter */
.religion-filter-section {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border: 1px solid #e9ecef;
}

.religion-filter-title {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #495057;
}

.religion-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.religion-checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    background-color: #fff;
    color: #495057;
    border-radius: 20px;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
}

.religion-checkbox-item:hover {
    background-color: #f8f9fa;
}

.religion-checkbox-item.checked {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}

.religion-checkbox-item input[type="checkbox"] {
    margin: 0;
}

.religion-avatar {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.religion-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.results-grid-large {
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
}

/* Result Cards */
.result-card {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.result-card-header {
    margin-bottom: 1rem;
}

.result-card-title {
    margin: 0 0 0.5rem 0;
    color: #212529;
    font-size: 1.25rem;
    line-height: 1.3;
}

.result-card-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
    color: #6c757d;
}

.result-card-meta-item {
    background-color: #e9ecef;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
}

.result-card-description {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #495057;
    font-size: 1rem;
}

.result-card-notes {
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.result-card-notes-title {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.result-card-notes-content {
    margin: 0;
    line-height: 1.5;
    color: #495057;
    font-size: 0.95rem;
}

.result-card-info {
    border-top: 1px solid #e9ecef;
    padding-top: 1rem;
    font-size: 0.875rem;
    color: #6c757d;
}

.result-card-info-item {
    margin-bottom: 0.5rem;
}

.result-card-info-label {
    font-weight: 600;
    color: #495057;
}

/* External URLs */
.external-urls {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #e3f2fd;
    border-radius: 8px;
    border: 1px solid #bbdefb;
}

.external-urls-title {
    font-size: 0.875rem;
    color: #1976d2;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.external-urls-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.external-url-link {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    background-color: #1976d2;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: background-color 0.2s ease;
    text-align: center;
}

.external-url-link:hover {
    background-color: #1565c0;
    color: #fff;
    text-decoration: none;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.action-btn {
    padding: 0.5rem 1rem;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.action-btn:hover {
    color: #fff;
    text-decoration: none;
}

.action-btn-primary {
    background-color: #007bff;
}

.action-btn-primary:hover {
    background-color: #0056b3;
}

.action-btn-success {
    background-color: #28a745;
}

.action-btn-success:hover {
    background-color: #218838;
}

.action-btn-info {
    background-color: #17a2b8;
}

.action-btn-info:hover {
    background-color: #138496;
}

.action-btn-warning {
    background-color: #fd7e14;
}

.action-btn-warning:hover {
    background-color: #e8690b;
}

.action-btn-secondary {
    background-color: #6f42c1;
}

.action-btn-secondary:hover {
    background-color: #5a32a3;
}

.action-btn-tertiary {
    background-color: #20c997;
}

.action-btn-tertiary:hover {
    background-color: #1ba37e;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    background-color: #0056b3;
}

.pagination-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.pagination-info {
    font-weight: 500;
    color: #495057;
}

/* Loading States */
.loading-container {
    text-align: center;
    padding: 3rem;
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.loading-text {
    font-size: 1.2rem;
    color: #6c757d;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #495057;
}

.empty-state-description {
    font-size: 1rem;
    color: #6c757d;
}

/* Results Summary */
.results-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    margin-bottom: 1rem;
}

.results-summary-info {
    font-size: 0.875rem;
    color: #495057;
}

.results-summary-btn {
    padding: 0.5rem 1rem;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.results-summary-btn:hover {
    background-color: #0056b3;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: capitalize;
}

.status-published {
    background-color: #d4edda;
    color: #155724;
}

.status-draft {
    background-color: #fff3cd;
    color: #856404;
}

.status-archived {
    background-color: #f8d7da;
    color: #721c24;
}

.status-active {
    background-color: #d4edda;
    color: #155724;
}

.status-inactive {
    background-color: #f8d7da;
    color: #721c24;
}

/* Religion Avatar */
.religion-avatar-large {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid #e9ecef;
}

.religion-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsive Design */
@media (max-width: 768px) {
    .search-filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-input-group,
    .sort-group {
        min-width: auto;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-btn {
        text-align: center;
    }
    
    .pagination {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .results-summary {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .result-card {
        padding: 1rem;
    }
    
    .search-filter-section,
    .religion-filter-section {
        padding: 1rem;
    }
    
    .religion-checkboxes {
        flex-direction: column;
        align-items: stretch;
    }
    
    .religion-checkbox-item {
        justify-content: center;
    }
}

/* Chat Interface Components */
.chat-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.chat-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    min-height: 85vh;
    display: flex;
    flex-direction: column;
}

.chat-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-back-btn {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    transition: all 0.3s;
}

.chat-back-btn:hover {
    background: rgba(255,255,255,0.2);
    color: white;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    justify-content: center;
}

.chat-header-avatar {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid white;
}

.chat-header-avatar-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    border: 2px solid white;
}

.chat-header-title {
    font-size: 1.5rem;
    margin: 0;
}

.chat-header-subtitle {
    margin: 5px 0 0 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

.chat-header-spacer {
    width: 80px;
}

.chat-messages {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    background: #f8f9fa;
}

.chat-message-system {
    margin: 20px 0;
    text-align: center;
}

.chat-system-content {
    display: inline-block;
    max-width: 80%;
    padding: 20px 30px;
    border-radius: 20px;
    background: #e9ecef;
    color: #6c757d;
}

.chat-system-text {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 10px;
}

.chat-system-subtitle {
    font-size: 0.9rem;
    opacity: 0.7;
}

.chat-message {
    margin: 30px 0;
    display: flex;
    align-items: flex-start;
    width: 100%;
    gap: 15px;
}

.chat-avatar-container {
    flex-shrink: 0;
}

.chat-avatar {
    width: 350px;
    height: 350px;
    border-radius: 12px;
    object-fit: cover;
    display: block;
}

.chat-avatar-user {
    border: 3px solid #3498db;
}

.chat-avatar-agent {
    border: 3px solid #16a085;
}

.chat-avatar-placeholder {
    width: 350px;
    height: 350px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 120px;
}

.chat-avatar-placeholder-user {
    background: #3498db;
    border: 3px solid #3498db;
}

.chat-avatar-placeholder-agent {
    background: linear-gradient(45deg, #16a085, #2c3e50);
    border: 3px solid #16a085;
}

.chat-bubble {
    padding: 20px 30px;
    border-radius: 12px;
    max-width: 70%;
}

.chat-bubble-user {
    background: #3498db;
    color: white;
}

.chat-bubble-agent {
    background: white;
    color: #333;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.chat-bubble-name {
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.chat-bubble-name-agent {
    color: #16a085;
}

.chat-bubble-text {
    font-size: 1.1rem;
    line-height: 1.6;
}

.chat-bubble-time {
    font-size: 0.9rem;
    margin-top: 10px;
    opacity: 0.8;
}

.chat-bubble-agent .chat-bubble-time {
    color: #7f8c8d;
}

.chat-input-container {
    padding: 20px;
    background: white;
    border-top: 2px solid #e9ecef;
}

.chat-form {
    display: flex;
    gap: 15px;
    align-items: center;
}

.chat-input {
    flex: 1;
    padding: 15px 25px;
    border: 2px solid #e9ecef;
    border-radius: 30px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.chat-input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.chat-send-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 15px 35px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.chat-send-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

/* Chat Responsive Design */
@media (max-width: 768px) {
    .chat-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .chat-header-spacer {
        display: none;
    }
    
    .chat-avatar {
        width: 150px;
        height: 150px;
    }
    
    .chat-avatar-placeholder {
        width: 150px;
        height: 150px;
        font-size: 60px;
    }
    
    .chat-bubble {
        max-width: 85%;
    }
    
    .chat-form {
        flex-direction: column;
    }
    
    .chat-input,
    .chat-send-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .chat-avatar {
        width: 100px;
        height: 100px;
    }
    
    .chat-avatar-placeholder {
        width: 100px;
        height: 100px;
        font-size: 40px;
    }
    
    .chat-bubble {
        max-width: 100%;
    }
}

/* ============================================================
   CHAT TYPING INDICATOR
   ============================================================ */

.chat-typing {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 0;
}

.chat-typing span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #95a5a6;
    animation: typing-bounce 1.4s infinite ease-in-out both;
}

.chat-typing span:nth-child(1) {
    animation-delay: -0.32s;
}

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

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

@keyframes typing-bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}