/* Custom styles for chat application */

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    background: white;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.login-card h1 {
    margin-bottom: 0.5rem;
    color: #333;
    font-size: 1.75rem;
}

.login-card p {
    color: #666;
    margin-bottom: 2rem;
}

.btn-google {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: box-shadow 0.2s, background-color 0.2s;
}

.btn-google:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background-color: #f8f9fa;
}

.btn-google svg {
    flex-shrink: 0;
}

/* User Bar */
.user-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    flex-shrink: 0;
}

.user-email {
    font-size: 0.9rem;
    color: #495057;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

html, body {
    height: 100%;
    margin: 0;
    overflow: hidden;
}

/* Drag and drop overlay */
body.dragging::before {
    content: 'Drop file to upload';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(13, 110, 253, 0.9);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    z-index: 9999;
    pointer-events: none;
}

body {
    display: flex;
    flex-direction: column;
}

.container-fluid {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.row {
    flex: 1;
    margin: 0;
}

.col-12 {
    display: flex;
    flex-direction: column;
    padding: 0;
    height: 100%;
}

.chat-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    position: relative;
}

.status-indicator {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    padding: 4px 10px !important;
    font-size: 0.75rem !important;
    border-radius: 12px !important;
    background-color: #6c757d !important;
    color: white !important;
    z-index: 100 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    font-weight: 500 !important;
}

.status-indicator.connected {
    background-color: #28a745 !important;
    color: white !important;
}

.status-indicator.disconnected,
.status-indicator.error {
    background-color: #dc3545 !important;
    color: white !important;
}

.messages-area {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    background-color: #f8f9fa;
    -webkit-overflow-scrolling: touch;
}

.input-area {
    flex-shrink: 0;
    padding: 15px;
    background-color: white;
    border-top: 1px solid #dee2e6;
    position: relative;
    z-index: 10;
}

.plus-menu-item:hover {
    background-color: #f0f0f0;
}

.message {
    margin-bottom: 0;
    padding: 6px 12px;
    background-color: white;
    border-bottom: 1px solid #e9ecef;
}

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

.message-content {
    margin-top: 2px;
    word-wrap: break-word;
}

.timestamp {
    font-size: 0.7rem;
    color: #6c757d;
}

.message-actions {
    display: flex;
    gap: 8px;
    opacity: 1;
}

.action-icon {
    cursor: pointer;
    font-size: 1rem;
    padding: 2px 4px;
    border-radius: 3px;
    transition: background-color 0.2s;
    user-select: none;
}

.action-icon:hover {
    background-color: #e9ecef;
}

.action-icon:active {
    background-color: #dee2e6;
}

.delete-icon {
    color: #dc3545;
}

.delete-icon:hover {
    background-color: #f8d7da;
}

/* Share group styles */
.share-group {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 1px 3px;
    border-radius: 4px;
    transition: background-color 0.3s, border-color 0.3s;
}

.share-group.active {
    background-color: #d4edda;
    border: 1px solid #a8d5a2;
}

.share-group .copy-share-icon {
    display: none !important;
    font-size: 0.85rem;
    padding: 2px 3px;
}

.share-group.active .copy-share-icon {
    display: inline-block !important;
}

.share-group .edit-short-url-icon {
    display: none !important;
    font-size: 0.85rem;
    padding: 2px 3px;
}

.share-group.active .edit-short-url-icon {
    display: inline-block !important;
}

/* Share icon styles */
.share-icon {
    filter: grayscale(100%);
    opacity: 0.6;
    transition: filter 0.3s, opacity 0.3s;
}

.share-icon:hover {
    filter: grayscale(50%);
    opacity: 0.8;
}

.share-icon.shared {
    filter: grayscale(0%);
    opacity: 1;
}

.share-icon.shared:hover {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.toast-notification {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: #212529;
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 0.9rem;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-notification.error {
    background-color: #dc3545;
}

.message-image {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}

.message-image:hover {
    transform: scale(1.02);
}

.message-video {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
}

.file-link {
    display: inline-block;
    padding: 10px 15px;
    background-color: #e9ecef;
    border-radius: 6px;
    text-decoration: none;
    color: #495057;
    transition: background-color 0.2s;
}

.file-link:hover {
    background-color: #dee2e6;
    color: #212529;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .messages-area {
        padding: 10px;
    }

    .input-area {
        padding: 10px;
        padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    }

    .message {
        padding: 8px 10px;
    }

    .timestamp {
        font-size: 0.65rem;
    }

    .action-icon {
        font-size: 0.9rem;
        padding: 4px 6px;
    }
}

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

.messages-area::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.messages-area::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.messages-area::-webkit-scrollbar-thumb:hover {
    background: #555;
}
