/* Social Media Modal Styles */
.social-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: none;
    align-items: flex-end;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.social-modal-content {
    background: #ffffff;
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 420px;
    max-height: 85vh;
    overflow: hidden;
    animation: slideUpFromBottom 0.3s ease;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
    border: none;
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}

.social-modal-header {
    padding: 24px 24px 16px 24px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    position: relative;
}

.social-modal-header::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
}

.social-modal-header h3 {
    color: #333333;
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.social-modal-close {
    background: none;
    border: none;
    color: #999999;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.social-modal-close:hover {
    background: #f5f5f5;
    color: #666666;
}

.social-menu-items {
    padding: 8px 0;
    flex: 1;
    overflow-y: auto;
}

.social-menu-item {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: none;
    position: relative;
    background: #ffffff;
}

.social-menu-item:hover:not(.coming-soon) {
    background: #f8f9fa;
}

.social-menu-item.coming-soon {
    opacity: 0.6;
    cursor: not-allowed;
}

.social-menu-item.coming-soon:hover {
    background: #ffffff;
}

.social-item-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.2);
}

.social-item-icon.chats-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.social-item-icon i {
    color: #ffffff;
    font-size: 1.1rem;
}

.social-item-content {
    flex: 1;
    min-width: 0;
}

.social-item-content h4 {
    color: #333333;
    margin: 0 0 4px 0;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.social-item-content p {
    color: #666666;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.3;
}

.social-item-arrow {
    color: #cccccc;
    margin-left: 16px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.social-menu-item:hover:not(.coming-soon) .social-item-arrow {
    color: #999999;
    transform: translateX(2px);
}

.social-coming-soon-badge {
    position: absolute;
    top: 12px;
    right: 20px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(255, 107, 107, 0.3);
}

.social-menu-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 12px 24px;
}

/* Chat Interface Styles */
.chat-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    z-index: 10001;
    display: flex;
    flex-direction: column;
}

/* Chat List View */
.chat-list-view {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-header {
    background: #1a1a1a;
    padding: 15px 20px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header-left {
    display: flex;
    align-items: center;
}

.back-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    margin-right: 15px;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: #333;
}

.chat-header h3 {
    color: #fff;
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.add-chat-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.add-chat-btn:hover {
    transform: scale(1.1);
}

/* Search Bar */
.chat-search {
    padding: 15px 20px;
    border-bottom: 1px solid #333;
}

.search-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-container i {
    position: absolute;
    left: 15px;
    color: #888;
    z-index: 1;
}

.search-input-container input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 25px;
    color: #fff;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s ease;
}

.search-input-container input:focus {
    border-color: #667eea;
    background: #333;
}

.search-input-container input::placeholder {
    color: #888;
}

/* Chat Requests */
.chat-requests-section {
    border-bottom: 1px solid #333;
}

.requests-header {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1a1a1a;
}

.requests-header h4 {
    color: #fff;
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
}

.requests-count {
    background: #ff6b6b;
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 500;
}

.requests-list {
    max-height: 200px;
    overflow-y: auto;
}

/* Chat Items */
.chats-list {
    flex: 1;
    overflow-y: auto;
}

.chat-item, .request-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid #2a2a2a;
}

.chat-item:hover, .request-item:hover {
    background: #1a1a1a;
}

.chat-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 15px;
    flex-shrink: 0;
    overflow: hidden;
    background: #333;
}

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

.chat-info {
    flex: 1;
    min-width: 0;
}

.chat-name {
    color: #fff;
    font-weight: 500;
    margin: 0 0 5px 0;
    font-size: 1rem;
}

.chat-last-message {
    color: #888;
    margin: 0;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-left: 10px;
}

.chat-time {
    color: #888;
    font-size: 0.8rem;
    margin-bottom: 5px;
}

.unread-count {
    background: #4fc3f7;
    color: #fff;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 500;
    min-width: 18px;
    text-align: center;
}

/* Request Actions */
.request-actions {
    display: flex;
    gap: 10px;
    margin-left: 10px;
}

.accept-btn, .decline-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.accept-btn {
    background: #4caf50;
    color: #fff;
}

.decline-btn {
    background: #f44336;
    color: #fff;
}

.accept-btn:hover {
    background: #45a049;
}

.decline-btn:hover {
    background: #da190b;
}

/* Chat Conversation View */
.chat-conversation-view {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.conversation-header {
    background: #1a1a1a;
    padding: 15px 20px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.conversation-header-left {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.contact-info {
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 1;
}

.contact-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
    overflow: hidden;
    background: #333;
}

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

.contact-details {
    min-width: 0;
    flex: 1;
}

.contact-details h4 {
    color: #fff;
    margin: 0 0 2px 0;
    font-size: 1rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-status {
    color: #888;
    font-size: 0.8rem;
}

.more-options-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.more-options-btn:hover {
    background: #333;
    color: #fff;
}

/* Messages Container */
.messages-container {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    display: flex;
    margin-bottom: 10px;
}

.message.sent {
    justify-content: flex-end;
}

.message.received {
    justify-content: flex-start;
}

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

.message.sent .message-bubble {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.message.received .message-bubble {
    background: #2a2a2a;
    color: #fff;
    border-bottom-left-radius: 4px;
}

.message-content {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.4;
}

.message-time {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 5px;
    text-align: right;
}

.message.received .message-time {
    color: #888;
}

/* Message Input */
.message-input-container {
    padding: 15px 20px;
    border-top: 1px solid #333;
    background: #1a1a1a;
}

.message-input {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #2a2a2a;
    border-radius: 25px;
    padding: 8px 12px;
    border: 1px solid #444;
}

.attachment-btn, .send-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.attachment-btn:hover, .send-btn:hover {
    background: #333;
    color: #fff;
}

.message-input input {
    flex: 1;
    background: none;
    border: none;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    padding: 8px 12px;
}

.message-input input::placeholder {
    color: #888;
}

.send-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

/* Add Chat Modal */
.add-chat-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-chat-content {
    background: #1a1a1a;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.add-chat-header {
    padding: 20px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.add-chat-header h4 {
    color: #fff;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
}

.close-add-chat {
    background: none;
    border: none;
    color: #888;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-add-chat:hover {
    background: #333;
    color: #fff;
}

.user-search {
    padding: 20px;
    border-bottom: 1px solid #333;
}

.search-results {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
}

.user-result {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid #2a2a2a;
}

.user-result:hover {
    background: #2a2a2a;
}

.user-result:last-child {
    border-bottom: none;
}

.user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    margin-right: 15px;
    flex-shrink: 0;
    overflow: hidden;
    background: #333;
}

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

.user-details h4 {
    color: #fff;
    margin: 0 0 5px 0;
    font-size: 1rem;
    font-weight: 500;
}

.user-details span {
    color: #888;
    font-size: 0.9rem;
}

/* Chat Request Modal */
.chat-request-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10003;
    display: flex;
    align-items: center;
    justify-content: center;
}

.request-modal-content {
    background: #1a1a1a;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    padding: 0;
    overflow: hidden;
}

.request-header {
    padding: 20px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.request-header h4 {
    color: #fff;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
}

.close-request-modal {
    background: none;
    border: none;
    color: #888;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-request-modal:hover {
    background: #333;
    color: #fff;
}

.request-user-info {
    padding: 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #333;
}

.request-user-info .user-avatar {
    margin-right: 15px;
}

.request-user-info .user-details h4 {
    color: #fff;
    margin: 0 0 5px 0;
    font-size: 1rem;
    font-weight: 500;
}

.request-user-info .user-details span {
    color: #888;
    font-size: 0.9rem;
}

.request-message {
    padding: 20px;
}

.request-message label {
    color: #fff;
    font-size: 0.9rem;
    margin-bottom: 10px;
    display: block;
}

.request-message textarea {
    width: 100%;
    padding: 12px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 10px;
    color: #fff;
    font-size: 0.9rem;
    outline: none;
    resize: vertical;
    min-height: 80px;
    max-height: 120px;
    font-family: inherit;
}

.request-message textarea:focus {
    border-color: #667eea;
    background: #333;
}

.request-message textarea::placeholder {
    color: #888;
}

.request-actions {
    padding: 20px;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.cancel-request-btn, .send-request-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-request-btn {
    background: #333;
    color: #fff;
}

.send-request-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.cancel-request-btn:hover {
    background: #444;
}

.send-request-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Loading and Empty States */
.loading-state, .empty-state {
    padding: 40px 20px;
    text-align: center;
    color: #888;
}

.loading-state i {
    font-size: 2rem;
    margin-bottom: 15px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #555;
}

.empty-state h4 {
    color: #fff;
    margin: 0 0 10px 0;
    font-size: 1.1rem;
}

.empty-state p {
    margin: 0;
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUpFromBottom {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

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

@keyframes slideRight {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes slideLeft {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .social-modal-content {
        width: 100%;
        max-width: none;
        max-height: 85vh;
        border-radius: 20px 20px 0 0;
    }
    
    .social-modal-header {
        padding: 20px 20px 12px 20px;
    }
    
    .social-menu-item {
        padding: 14px 20px;
    }
    
    .social-item-icon {
        width: 44px;
        height: 44px;
        margin-right: 14px;
    }
    
    .chat-container {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
    }
    
    .message-bubble {
        max-width: 85%;
    }
    
    .add-chat-content, .request-modal-content {
        width: 95%;
        margin: 20px;
    }
}

@media (max-width: 480px) {
    .social-modal-content {
        width: 100%;
        max-width: none;
        height: auto;
        border-radius: 20px 20px 0 0;
        max-height: 90vh;
    }
    
    .social-modal-header {
        padding: 18px 18px 12px 18px;
    }
    
    .social-modal-header h3 {
        font-size: 1.3rem;
    }
    
    .social-menu-item {
        padding: 12px 18px;
    }
    
    .social-item-icon {
        width: 42px;
        height: 42px;
        margin-right: 12px;
    }
    
    .social-menu-divider {
        margin: 8px 18px;
    }
    
    .chat-header, .conversation-header {
        padding: 12px 15px;
    }
    
    .messages-container {
        padding: 15px;
    }
    
    .message-input-container {
        padding: 12px 15px;
    }
}
