/* Chat interface styling */
.chat-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f5f7fb;
}

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

.chat-title {
    font-size: 1.25rem;
    font-weight: 500;
    color: #333;
    margin: 0;
}

.chat-status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.message {
    max-width: 80%;
    margin-bottom: 15px;
    padding: 10px 15px;
    border-radius: 15px;
    position: relative;
    animation: fadeIn 0.3s ease;
}

.message-user {
    align-self: flex-end;
    background-color: #dceefb;
    border-bottom-right-radius: 5px;
    margin-left: auto;
}

.message-admin {
    align-self: flex-start;
    background-color: #ffffff;
    border-bottom-left-radius: 5px;
    margin-right: auto;
}

.message-content {
    margin: 0;
    word-wrap: break-word;
}

.message-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 0.75rem;
    color: #6c757d;
}

.message-time {
    margin-left: 10px;
}

.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    background-color: #2176ae;
}

.chat-footer {
    padding: 15px;
    background-color: #ffffff;
    border-top: 1px solid #e1e5eb;
}

.chat-input-container {
    display: flex;
    position: relative;
}

.chat-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ced4da;
    border-radius: 24px;
    font-size: 1rem;
    resize: none;
    min-height: 44px;
    max-height: 100px;
    overflow-y: auto;
}

.chat-input::placeholder {
    color: #adb5bd;
}

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

.send-button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #2176ae;
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.send-button:hover {
    background-color: #0069d9;
}

.send-button:disabled {
    background-color: #b8daff;
    cursor: not-allowed;
}

.ticket-info {
    background-color: #f8f9fa;
    border-left: 4px solid #2176ae;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.ticket-info h5 {
    margin-top: 0;
    color: #495057;
}

.ticket-info p {
    margin-bottom: 5px;
    color: #6c757d;
}

.ticket-info p strong {
    color: #495057;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Close ticket button */
.close-ticket-btn {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    margin-right: 15px;
}

.close-ticket-btn:hover {
    background-color: #d32f2f;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .message {
        max-width: 90%;
    }
    
    .chat-header {
        padding: 10px;
    }
    
    .chat-body {
        padding: 10px;
    }
    
    .chat-footer {
        padding: 10px;
    }
}

/* Image attachment styling */
.message-image {
    max-width: 200px;
    margin-top: 10px;
    border-radius: 8px;
    cursor: pointer;
}

.new-message {
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
        
@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}


.admin-controls {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.admin-controls h5 {
    margin-top: 0;
    color: #495057;
    margin-bottom: 15px;
}

.admin-controls .form-group {
    margin-bottom: 15px;
}

.admin-controls-header {
    transition: all 0.3s ease;
    padding: 8px 0;
    border-radius: 4px;
}

.admin-controls-header:hover {
    background-color: #f0f0f0;
    padding-left: 8px;
}

.toggle-icon {
    transition: transform 0.3s ease;
}

.collapsed .toggle-icon {
    transform: rotate(-90deg);
}
        
.form-group {
    margin-bottom: 1rem;
}
        
.form-control:focus, .form-select:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}
        
.btn-success {
    background-color: #28a745;
    border-color: #28a745;
}
        
.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
}
        
.message-image {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
    max-width: 300px;
    max-height: 300px;
    object-fit: contain;
}
        
.message-image:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
        
#modalImage {
    max-height: calc(80vh - 120px);
    object-fit: contain;
}
        
.modal-lg {
    max-width: 900px;
}

.chat-input-container {
    position: relative;
    display: flex;
    align-items: flex-end;
}

.file-upload-button {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-upload-button:hover {
    color: #2176ae;
}

.file-upload-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.spin {
    animation: spin 1s linear infinite;
}

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

.message-image {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    max-width: 100%;
    height: auto;
    margin: 10px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

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

.ticket-closed-info {
    margin-top: 20px;
}

.resolution-summary {
    margin-top: 20px;
    animation: fadeIn 0.5s ease-in-out;
}

.resolution-summary .card {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.resolution-summary .card-header {
    border-radius: 8px 8px 0 0;
    font-weight: 500;
}

.resolution-summary .card-body {
    padding: 1.5rem;
}

.resolution-summary .card-text {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 0;
}

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

.time-control-container {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    background-color: #f8f9fa;
}

.time-display {
    text-align: center;
    margin-bottom: 15px;
}

.time-display .badge {
    font-size: 1.1rem;
    padding: 8px 16px;
}

.time-buttons {
    justify-content: center;
}

.time-buttons .btn {
    min-width: 80px;
}

/* Estilos para notificações */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
    min-width: 250px;
    max-width: 400px;
    width: auto;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s, transform 0.3s;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

.notification.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.notification.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.notification.info {
    background-color: #cce5ff;
    color: #004085;
    border: 1px solid #b8daff;
}

.notification.warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.close-ticket-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s;
}

.close-ticket-btn:hover {
    background-color: #c82333;
}

/* WebSocket status indicator */
.ws-status {
    display: inline-flex;
    align-items: center;
    font-size: 0.8rem;
    padding: 2px 6px;
    border-radius: 12px;
    margin-left: 10px;
}

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

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

.ws-status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
}

.ws-status-connected .ws-status-indicator {
    background-color: #28a745;
}

.ws-status-disconnected .ws-status-indicator {
    background-color: #dc3545;
}

.message-image {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
    max-width: 300px;
    max-height: 300px;
    object-fit: contain;
    cursor: pointer;
    margin: 10px 0;
}
    
.message-image:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
    
#modalImage {
    max-height: calc(80vh - 120px);
    object-fit: contain;
}
    
.modal-lg {
    max-width: 900px;
}

.ticket-closed-info {
    margin-top: 20px;
}

.resolution-summary {
    margin-top: 20px;
    animation: fadeIn 0.5s ease-in-out;
}

.resolution-summary .card {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.resolution-summary .card-header {
    border-radius: 8px 8px 0 0;
    font-weight: 500;
}

.resolution-summary .card-body {
    padding: 1.5rem;
}

.resolution-summary .card-text {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* AnyDesk styles */
.anydesk-logo {
    width: 32px;
    height: 32px;
    background-color: transparent;
    color: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 8px;
    text-decoration: none;
    border: none;
    position: relative;
    overflow: hidden;
}

.anydesk-logo::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    background-image: url('../img/anydesk.svg');
    background-size: contain;
    background-repeat: no-repeat;
}


.anydesk-modal .modal-body {
    padding: 2rem;
}

.anydesk-steps {
    counter-reset: step-counter;
}

.anydesk-step {
    counter-increment: step-counter;
    margin-bottom: 1.5rem;
    padding-left: 3rem;
    position: relative;
}

.anydesk-step::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    background-color: #d32f2f;
    color: white;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.anydesk-step h6 {
    color: #d32f2f;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.anydesk-download-btn {
    background-color: #d32f2f;
    border-color: #d32f2f;
    color: white;
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.anydesk-download-btn:hover {
    background-color: #b71c1c;
    border-color: #b71c1c;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

/* Review modal styles */
.review-modal .modal-body {
    padding: 2rem;
    text-align: center;
}

.review-options {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
}

.review-option {
    cursor: pointer;
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    min-width: 120px;
    background: white;
}

.review-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.review-option.positive {
    border-color: #28a745;
    color: #28a745;
}

.review-option.positive.selected {
    background-color: #28a745;
    color: white;
}

.review-option.neutral {
    border-color: #ffc107;
    color: #856404;
}

.review-option.neutral.selected {
    background-color: #ffc107;
    color: #856404;
}

.review-option.negative {
    border-color: #dc3545;
    color: #dc3545;
}

.review-option.negative.selected {
    background-color: #dc3545;
    color: white;
}

.review-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.review-text {
    font-weight: 600;
    font-size: 0.9rem;
}

.review-comment {
    margin-top: 1.5rem;
}

.review-comment textarea {
    resize: vertical;
    min-height: 80px;
}