/* Support Chat Styles */
.support-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    background: #fff;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    min-height: 100vh;
}

.support-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 20px;
    text-align: center;
    width: 100%;
}

.support-header h2 {
    margin: 0 0 10px 0;
    font-size: 2rem;
    font-weight: 600;
}

.support-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 1.1rem;
}

/* Chat Container */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    width: 100%;
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
    max-height: none;
    width: 100%;
}

/* Message Layout - Complete Restructure */
.message {
    margin-bottom: 20px;
    animation: fadeInUp 0.3s ease;
}

/* User Message - Right Side */
.user-message {
    text-align: right;
}

.user-message .message-header {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-bottom: 8px;
    gap: 2px;
}

.user-message .message-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.user-message .sender-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #495057;
    text-align: right;
}

.user-message .message-time {
    font-size: 0.8rem;
    color: #6c757d;
    direction: ltr;
    text-align: right;
}

.user-message .message-content {
    background: #007bff;
    color: white;
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
    width: 100%;
    text-align: right;
    margin-top: 8px;
}

/* Admin Message - Left Side */
.admin-message {
    text-align: left;
}

.admin-message .message-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 8px;
    gap: 2px;
}

.admin-message .message-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.admin-message .sender-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #495057;
    text-align: left;
}

.admin-message .message-time {
    font-size: 0.8rem;
    color: #6c757d;
    direction: ltr;
    text-align: left;
}

.admin-message .message-content {
    background: #28a745;
    color: white;
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
    width: 100%;
    text-align: left;
    margin-top: 8px;
}

.message-content p {
    margin: 0;
    line-height: 1.5;
    word-wrap: break-word;
}

/* Attachment Info */
.attachment-info {
    margin-top: 10px;
    padding: 10px;
    background: rgba(255,255,255,0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.attachment-info i {
    color: #ffc107;
}

.file-name {
    font-weight: 500;
    word-break: break-all;
}

.file-size {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

/* Message Actions */
.message-actions {
    margin-top: 10px;
    text-align: left;
}

/* Chat Input Container */
.chat-input-container {
    padding: 20px;
    background: white;
    border-top: 1px solid #e9ecef;
    width: 100%;
}

.input-group {
    margin-bottom: 15px;
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.input-group textarea {
    border-radius: 20px;
    border: 2px solid #e9ecef;
    padding: 12px 20px;
    resize: none;
    transition: border-color 0.3s ease;
    flex: 1;
    min-height: 60px;
}

.input-group textarea:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

.input-group .btn {
    border-radius: 20px;
    padding: 12px 25px;
    margin-left: 0;
    font-weight: 500;
    white-space: nowrap;
    min-width: 100px;
}

/* File Upload Section */
.file-upload-section {
    margin-bottom: 15px;
}

.file-input-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6c757d;
    width: 100%;
    justify-content: center;
}

.file-label:hover {
    border-color: #007bff;
    background: #e3f2fd;
    color: #007bff;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: #e8f5e8;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.file-name {
    font-weight: 500;
    color: #155724;
    word-break: break-all;
}

.file-size {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Upload Info */
.upload-info {
    margin-bottom: 10px;
}

.upload-info small {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

/* Character Count */
.character-count {
    text-align: right;
}

.character-count small {
    font-size: 0.8rem;
}

/* No Messages */
.no-messages {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.no-messages i {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-messages p {
    margin: 10px 0;
    font-size: 1.1rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .support-container {
        margin: 0;
        border-radius: 0;
    }
    
    .chat-container {
        height: calc(100vh - 180px);
    }
}

@media (max-width: 768px) {
    .support-container {
        margin: 0;
        border-radius: 0;
        min-height: 100vh;
    }
    
    .support-header {
        padding: 20px 15px;
    }
    
    .support-header h2 {
        font-size: 1.5rem;
    }
    
    .support-header p {
        font-size: 1rem;
    }
    
    .chat-container {
        height: calc(100vh - 160px);
    }
    
    .chat-messages {
        padding: 15px;
    }
    
    .message-content {
        padding: 12px;
    }
    
    .input-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .input-group .btn {
        margin-left: 0;
        padding: 12px 20px;
        width: 100%;
    }
    
    .attachment-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .file-label {
        padding: 15px;
        font-size: 0.9rem;
    }
    
    /* Maintain correct message layout on mobile */
    .user-message {
        text-align: right;
    }
    
    .user-message .message-header {
        align-items: flex-end;
    }
    
    .user-message .message-info {
        align-items: flex-end;
    }
    
    .user-message .message-time {
        text-align: right;
        direction: ltr;
    }
    
    .user-message .message-content {
        text-align: right;
        width: 100%;
    }
    
    .admin-message {
        text-align: left;
    }
    
    .admin-message .message-header {
        align-items: flex-start;
    }
    
    .admin-message .message-info {
        align-items: flex-start;
    }
    
    .admin-message .message-time {
        text-align: left;
        direction: ltr;
    }
    
    .admin-message .message-content {
        text-align: left;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .support-header {
        padding: 15px 10px;
    }
    
    .support-header h2 {
        font-size: 1.3rem;
    }
    
    .chat-messages {
        padding: 10px;
    }
    
    .chat-input-container {
        padding: 15px 10px;
    }
    
    .message-content {
        max-width: 100%;
        padding: 10px;
    }
    
    .input-group textarea {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .file-label {
        padding: 12px;
        font-size: 0.8rem;
    }
}

/* Scrollbar Styling */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Alert Styling */
.alert {
    margin: 20px;
    border-radius: 10px;
    border: none;
}

@media (max-width: 768px) {
    .alert {
        margin: 15px 10px;
        border-radius: 8px;
    }
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert i {
    margin-right: 8px;
}

/* Button Hover Effects */
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

/* File Upload Hover Effects */
.file-label:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Ticket Section Styling */
.ticket-section {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.ticket-header {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.ticket-title {
    margin: 0;
    color: #495057;
    font-size: 1.1rem;
}

/* Badge Styling */
.badge {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 12px;
}

/* Form Responsiveness */
@media (max-width: 768px) {
    .input-group textarea {
        min-height: 80px;
    }
    
    .file-upload-section {
        margin-bottom: 20px;
    }
    
    .upload-info small {
        font-size: 0.8rem;
    }
    
    .character-count {
        text-align: center;
    }
} 