/* Base Styles & Variables */
:root {
    --primary: #6D9DC5;
    --primary-light: #A7C6DA;
    --secondary: #8FB8A6;
    --accent: #F3E8EE;
    --text: #2D3047;
    --text-light: #5A5D7A;
    --background: #F9F7F3;
    --card-bg: #FFFFFF;
    --shadow: rgba(0, 0, 0, 0.05);
    --success: #8FB8A6;
    --warning: #E6AF2E;
    --error: #E15554;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    padding-bottom: 70px; /* Space for bottom navbar */
}

/* Typography */
h1, h2, h3, h4 {
    color: var(--text);
    font-weight: 600;
}

p {
    color: var(--text-light);
}

/* Layout Components */
.container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 15px;
}

.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--shadow);
}

/* Header */
header {
    background: var(--primary);
    color: white;
    padding: 15px 0;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.logo i {
    font-size: 1.5rem;
}

/* Main Content */
main {
    padding: 20px 0;
}

.welcome-message {
    text-align: center;
    margin-bottom: 25px;
}

.welcome-message h2 {
    margin-bottom: 10px;
}

/* Post Styles */
.post {
    border-left: 4px solid var(--primary-light);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.post-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.user-info h4 {
    font-size: 1rem;
}

.user-info span {
    font-size: 0.8rem;
    color: var(--text-light);
}

.post-content {
    margin-bottom: 15px;
}

.post-actions {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.action-btn {
    background: none;
    border: none;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: color 0.2s;
}

.action-btn:hover {
    color: var(--primary);
}

.action-btn.liked {
    color: var(--error);
}

.action-btn.liked i {
    font-weight: 900;
}

/* Comments Section */
.comments {
    margin-top: 20px;
    display: none; /* Hidden by default */
}

.comments.expanded {
    display: block; /* Show when expanded */
}

.comment {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    padding: 15px;
    border-radius: 10px;
    background-color: var(--background);
    position: relative;
}

.comment:last-child {
    margin-bottom: 0;
}

.comment-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-user {
    font-weight: 600;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.original-poster-badge {
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
}

.comment-text {
    margin-bottom: 10px;
}

.comment-actions {
    display: flex;
    gap: 15px;
    margin-top: 8px;
}

.comment-action-btn {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: color 0.2s;
}

.comment-action-btn:hover {
    color: var(--primary);
}

.comment-action-btn.liked {
    color: var(--error);
}

.comment-replies {
    margin-top: 15px;
    padding-left: 20px;
    border-left: 2px solid var(--accent);
}

.reply {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    padding: 12px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.7);
}

.reply:last-child {
    margin-bottom: 0;
}

.reply-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    font-size: 0.8rem;
}

.reply-content {
    flex: 1;
}

.reply-user {
    font-weight: 600;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
}

.reply-text {
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.reply-actions {
    display: flex;
    gap: 12px;
}

.reply-action-btn {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    transition: color 0.2s;
}

.reply-action-btn:hover {
    color: var(--primary);
}

.reply-action-btn.liked {
    color: var(--error);
}

.add-comment, .add-reply {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.comment-input, .reply-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    transition: border-color 0.2s;
    font-size: 0.9rem;
}

.comment-input:focus, .reply-input:focus {
    border-color: var(--primary);
}

.send-comment, .send-reply, .comment-submit-btn, .reply-submit-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.send-comment:hover, .send-reply:hover, .comment-submit-btn:hover, .reply-submit-btn:hover {
    background: var(--primary-light);
}

.view-replies-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.8rem;
    cursor: pointer;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 20px;
    color: var(--text-light);
}

.loading i {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--primary);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card-bg);
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    box-shadow: 0 -2px 10px var(--shadow);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.8rem;
    transition: color 0.2s;
}

.nav-item.active {
    color: var(--primary);
}

.nav-item i {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.nav-add {
    background: var(--primary);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -25px;
    box-shadow: 0 4px 10px rgba(109, 157, 197, 0.3);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 25px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: var(--primary-light);
}

.btn-primary:disabled {
    background: var(--text-light);
    cursor: not-allowed;
}

/* Therapist Section */
.therapist-card {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.therapist-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.therapist-info h3 {
    margin-bottom: 5px;
}

.therapist-specialty {
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 0.9rem;
    font-weight: 600;
}

.therapist-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* Resources Section */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
    margin-bottom: 30px;
}

.resource-item {
    background: var(--accent);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: transform 0.2s;
}

.resource-item:hover {
    transform: translateY(-3px);
}

.resource-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.resource-category {
    display: inline-block;
    background: var(--primary-light);
    color: var(--text);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    margin: 10px 0;
    font-weight: 600;
}

/* User Resources List */
#userResourcesList {
    margin-top: 30px;
}

#userResourcesList h3 {
    margin-bottom: 20px;
    color: var(--text);
}

#userResourcesList .resource-item {
    background: var(--card-bg);
    text-align: left;
    padding: 20px;
}

#userResourcesList .resource-item h4 {
    margin-bottom: 10px;
    color: var(--primary);
}

#userResourcesList .resource-item p {
    margin-bottom: 15px;
}

/* My Posts Section */
.post-meta {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

/* Delete Post Button */
.delete-post {
    color: var(--error);
    border-color: var(--error);
}

.delete-post:hover {
    background: var(--error);
    color: white;
}

/* Contact Volunteer Button */
.contact-volunteer {
    font-size: 0.9rem;
    padding: 8px 16px;
}

/* Form Improvements */
.form-control:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

/* Success Messages */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

/* Responsive Adjustments */
@media (min-width: 768px) {
    .bottom-nav {
        display: none;
    }
    
    body {
        padding-bottom: 0;
    }
    
    .desktop-nav {
        display: flex;
        background: var(--card-bg);
        padding: 15px 0;
        box-shadow: 0 2px 10px var(--shadow);
        margin-bottom: 20px;
    }
    
    .desktop-nav .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .desktop-nav-items {
        display: flex;
        gap: 25px;
    }
    
    .desktop-nav-item {
        text-decoration: none;
        color: var(--text-light);
        font-weight: 500;
        transition: color 0.2s;
    }
    
    .desktop-nav-item:hover, .desktop-nav-item.active {
        color: var(--primary);
    }
    
    .nav-add-desktop {
        background: var(--primary);
        color: white;
        padding: 10px 20px;
        border-radius: 20px;
        text-decoration: none;
        display: flex;
        align-items: center;
        gap: 8px;
        transition: background 0.2s;
    }
    
    .nav-add-desktop:hover {
        background: var(--primary-light);
    }
    
    /* Desktop specific therapist card styles */
    .therapist-card {
        align-items: center;
    }
}

@media (max-width: 767px) {
    .desktop-nav {
        display: none;
    }
    
    .comment-replies {
        padding-left: 15px;
    }
    
    .reply {
        padding: 10px;
    }
    
    .therapist-card {
        flex-direction: column;
        text-align: center;
    }
    
    .therapist-avatar {
        margin: 0 auto 15px;
    }
    
    .resources-grid {
        grid-template-columns: 1fr;
    }
    
    .therapist-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-outline {
        width: 100%;
        justify-content: center;
    }
}

/* Button loading state */
.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Selection styles */
::selection {
    background: var(--primary-light);
    color: var(--text);
}

/* Focus styles for accessibility */
button:focus, 
input:focus, 
textarea:focus, 
select:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}


/* Messages Section Styles */
.conversation-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px var(--shadow);
    border: 1px solid var(--accent);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.conversation-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px var(--shadow);
}

.conversation-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.user-details h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

.user-role {
    margin: 4px 0 0 0;
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.message-time {
    font-size: 0.8rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 6px;
}

.unread-badge {
    background: var(--error);
    color: white;
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: 600;
}

.conversation-preview {
    margin-bottom: 16px;
}

.message-text {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.reply-count {
    margin: 8px 0 0 0;
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 500;
}

.conversation-actions {
    display: flex;
    justify-content: flex-end;
}

.empty-state, .error-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
}

.empty-state i, .error-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.7;
}

.empty-state h3, .error-state h3 {
    margin: 0 0 8px 0;
    color: var(--text);
    font-size: 1.3rem;
}

.empty-state p, .error-state p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Responsive adjustments for messages */
@media (max-width: 767px) {
    .conversation-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .message-time {
        align-self: flex-end;
    }
    
    .avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .user-details h4 {
        font-size: 1rem;
    }
}

/* Conversation Modal Styles */
.conversation-container {
    max-height: 70vh;
    display: flex;
    flex-direction: column;
}

.conversation-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    max-height: 400px;
    border-bottom: 1px solid var(--accent);
    margin-bottom: 20px;
}

.message-bubble {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
}

.message-bubble.sent {
    align-items: flex-end;
}

.message-bubble.received {
    align-items: flex-start;
}

.message-content {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 18px;
    position: relative;
    word-wrap: break-word;
}

.message-bubble.sent .message-content {
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.message-bubble.received .message-content {
    background: var(--accent);
    color: var(--text);
    border-bottom-left-radius: 4px;
}

.message-sender {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-light);
}

.message-text {
    margin: 0;
    line-height: 1.4;
}

.message-time {
    font-size: 0.7rem;
    color: var(--text-light);
    margin-top: 4px;
    text-align: right;
}

.message-bubble.received .message-time {
    text-align: left;
}

.conversation-input {
    padding: 0 20px 20px;
}

.conversation-input textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    resize: vertical;
    font-family: inherit;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.conversation-input textarea:focus {
    outline: none;
    border-color: var(--primary);
}

#sendReplyBtn {
    width: 100%;
}

.no-messages {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
}

.no-messages i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.7;
}

.no-messages h3 {
    margin: 0 0 8px 0;
    color: var(--text);
}

.no-messages p {
    margin: 0;
    font-size: 0.95rem;
}

/* Messages Page Styles */
.conversation-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 800px;
    margin: 0 auto;
    background: var(--background);
}

.conversation-header {
    border-radius: 0;
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    background: var(--card-background);
}

.conversation-header .user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.conversation-header .avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
}

.conversation-header .user-details h3 {
    margin: 0 0 0.25rem 0;
    color: var(--text);
}

.conversation-header .user-role {
    margin: 0;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.conversation-header .user-specialty {
    margin: 0.25rem 0 0 0;
    color: var(--text-light);
    font-size: 0.85rem;
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--background);
}

.message {
    display: flex;
    max-width: 70%;
}

.user-message {
    align-self: flex-end;
}

.other-message {
    align-self: flex-start;
}

.message-bubble {
    padding: 0.75rem 1rem;
    border-radius: 1.25rem;
    position: relative;
    word-wrap: break-word;
}

.user-message .message-bubble {
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 0.5rem;
}

.other-message .message-bubble {
    background: var(--card-background);
    border: 1px solid var(--border);
    border-bottom-left-radius: 0.5rem;
}

.message-text {
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.message-time {
    font-size: 0.75rem;
    opacity: 0.7;
    text-align: right;
}

.other-message .message-time {
    text-align: left;
}

.message-input-container {
    border-radius: 0;
    border-top: 1px solid var(--border);
    padding: 1rem;
    background: var(--card-background);
}

.message-input-wrapper {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.message-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    background: var(--background);
    font-size: 1rem;
    resize: none;
    max-height: 120px;
    outline: none;
    transition: border-color 0.2s;
}

.message-input:focus {
    border-color: var(--primary);
}

.send-btn {
    padding: 0.75rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
}

.send-btn:hover:not(:disabled) {
    background: var(--primary-dark);
}

.send-btn:disabled {
    background: var(--text-light);
    cursor: not-allowed;
}

.message-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.char-count {
    font-size: 0.75rem;
    color: var(--text-light);
}

.empty-conversation {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}

.empty-conversation i {
    margin-bottom: 1rem;
    opacity: 0.5;
}

.back-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.back-btn:hover {
    background: var(--border);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
}

.header-content h1 {
    margin: 0;
    font-size: 1.25rem;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1.1rem;
    color: var(--text);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.btn-icon:hover {
    background: var(--border);
}

/* Loading and Error States */
.loading, .error-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

.error-state i {
    color: var(--error);
    margin-bottom: 1rem;
}

.error-state button {
    margin-top: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .message {
        max-width: 85%;
    }
    
    .conversation-header .avatar {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .conversation-header .user-details h3 {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .message {
        max-width: 90%;
    }
    
    .message-bubble {
        padding: 0.6rem 0.8rem;
    }
}