/* Tickets Module - User Interface Styles */

/* ===== Container & Layout ===== */
.tickets-user-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
}

.tickets-user-header {
    margin-bottom: 30px;
}

/* ===== Ticket Form ===== */
.ticket-form-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 30px;
    margin-bottom: 30px;
}

/* ===== Ticket Detail Header ===== */
.ticket-detail-header {
    background: linear-gradient(135deg, #00a0e3 0%, #33b5e5 100%);
    color: #fff;
    padding: 20px 25px;
    border-radius: 8px 8px 0 0;
}

.ticket-detail-header h2 {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 600;
}

.ticket-detail-header .ticket-meta {
    font-size: 13px;
    opacity: 0.9;
}

.ticket-status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.ticket-status-badge.status-new { background: #ffc107; color: #000; }
.ticket-status-badge.status-processing { background: #17a2b8; color: #fff; }
.ticket-status-badge.status-answered { background: #007bff; color: #fff; }
.ticket-status-badge.status-closed { background: #28a745; color: #fff; }
.ticket-status-badge.status-refused { background: #dc3545; color: #fff; }

/* ===== Info Panel ===== */
.ticket-info-panel {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0 0 8px 8px;
    margin-bottom: 25px;
}

.ticket-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 25px 30px;
}

.ticket-info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.ticket-info-label {
    font-size: 12px;
    text-transform: uppercase;
    color: #6c757d;
    font-weight: 600;
}

.ticket-info-value {
    font-size: 15px;
    color: #2c3e50;
    font-weight: 500;
}

/* ===== Conversation ===== */
.ticket-conversation {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 25px;
}

.ticket-conversation-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
}

.ticket-conversation-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.ticket-messages-container {
    padding: 20px;
    max-height: 600px;
    overflow-y: auto;
}

.ticket-message {
    margin-bottom: 20px;
    padding: 15px 20px;
    border-radius: 8px;
}

.ticket-message.message-user {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    margin-right: 50px;
}

.ticket-message.message-organizer {
    background: #f3e5f5;
    border-left: 4px solid #9c27b0;
    margin-left: 50px;
}

.ticket-message.message-admin {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
    margin-left: 100px;
}

.ticket-message-content {
    font-size: 15px;
    line-height: 1.6;
    color: #2c3e50;
    word-wrap: break-word;
}

.ticket-message-footer {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #6c757d;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* ===== Attachments ===== */
.message-attachments {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.message-attachments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.message-attachment {
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.message-attachment img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.message-attachment-info {
    padding: 8px;
    font-size: 11px;
    background: #f8f9fa;
    text-align: center;
}

/* ===== Reply Form ===== */
.ticket-reply-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 25px;
    margin-bottom: 25px;
}

/* ===== Attachment Preview ===== */
.attachment-preview-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin-bottom: 10px;
    background: #f8f9fa;
}

.attachment-preview-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.attachment-preview-remove {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
}

/* ===== Buttons ===== */
.btn-tickets-primary {
    background: linear-gradient(135deg, #00a0e3 0%, #33b5e5 100%);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

.btn-tickets-back {
    background: #f8f9fa !important;
    color: #2c3e50 !important;
    border: 2px solid #e9ecef;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}


/* ===== Responsive ===== */
@media (max-width: 768px) {
    .tickets-user-container { padding: 15px; }
    .ticket-form-card, .ticket-reply-container { padding: 20px; }
    .ticket-info-grid { grid-template-columns: 1fr; }
    .ticket-message.message-user,
    .ticket-message.message-organizer,
    .ticket-message.message-admin { margin-left: 0; margin-right: 0; }
}
/* Tickets Module - User Interface Styles */

/* ===== Container & Layout ===== */
.tickets-user-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
}

.tickets-user-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.tickets-user-header h1 {
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #2c3e50;
}

/* ===== Ticket Form ===== */
.ticket-form-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 30px;
    margin-bottom: 30px;
}

.ticket-create-container {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 30px;
}

.ticket-form-body {
    padding: 30px;
}

.ticket-form-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.ticket-form-section:last-of-type {
    border-bottom: none;
}

.ticket-form-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #00a0e3 !important;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #00a0e3 !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ticket-form-section-title i {
    font-size: 20px;
}

.ticket-form-actions {
    text-align: center;
    padding: 25px 30px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

/* ===== Ticket Detail View ===== */
.ticket-detail-header {
    background: linear-gradient(135deg, #00a0e3 0%, #33b5e5 100%);
    color: #fff;
    padding: 25px 30px;
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
}

.ticket-detail-header h2 {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 600;
}

.ticket-detail-header .ticket-meta {
    font-size: 13px;
    opacity: 0.9;
}

.ticket-status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    margin-top: 5px;
}

.ticket-status-badge.status-new {
    background: #ffc107;
    color: #000;
}

.ticket-status-badge.status-processing {
    background: #17a2b8;
    color: #fff;
}

.ticket-status-badge.status-answered {
    background: #007bff;
    color: #fff;
}

.ticket-status-badge.status-closed {
    background: #28a745;
    color: #fff;
}

.ticket-status-badge.status-refused {
    background: #dc3545;
    color: #fff;
}

/* ===== Ticket Info Panel ===== */
.ticket-info-panel {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0 0 8px 8px;
    margin-bottom: 25px;
}

.ticket-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 25px 30px;
}

.ticket-info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.ticket-info-label {
    font-size: 12px;
    text-transform: uppercase;
    color: #6c757d;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.ticket-info-value {
    font-size: 15px;
    color: #2c3e50;
    font-weight: 500;
}

/* ===== Old Message Styles (Deprecated - keeping for compatibility) ===== */
.ticket-message.message-user {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    margin-right: 50px;
}

.ticket-message.message-organizer {
    background: #f3e5f5;
    border-left: 4px solid #9c27b0;
    margin-left: 50px;
}

.ticket-message.message-admin {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
    margin-left: 100px;
}

.ticket-message-author {
    font-weight: 600;
}

.message-attachments-title {
    font-size: 13px;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 10px;
}

.message-attachment-placeholder {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: #6c757d;
    font-size: 14px;
}

.message-attachment-name {
    font-weight: 600;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-attachment-size {
    color: #6c757d;
}

/* ===== Reply Form ===== */
.ticket-reply-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 25px;
    margin-bottom: 25px;
}

.ticket-reply-container h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.ticket-reply-textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s;
}

.ticket-reply-textarea:focus {
    outline: none;
    border-color: #00a0e3;
}

.ticket-reply-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    gap: 10px;
    flex-wrap: wrap;
}

/* ===== Attachment Preview (Upload) ===== */
.attachments-preview-container {
    margin-top: 15px;
}

.attachment-preview-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 12px 15px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin-bottom: 10px;
    background: #f8f9fa;
    transition: all 0.2s;
}

.attachment-preview-item:hover {
    background: #e9ecef;
}

.attachment-preview-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    min-width: 0;
}

.attachment-preview-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    flex-shrink: 0;
}

.attachment-preview-thumb-placeholder {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #6c757d;
    font-size: 12px;
    flex-shrink: 0;
}

.attachment-preview-details {
    flex: 1;
    min-width: 0;
}

.attachment-preview-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
    word-break: break-word;
}

.attachment-preview-meta {
    font-size: 12px;
    color: #6c757d;
}

.attachment-preview-remove {
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.attachment-preview-remove:hover {
    background: #c82333;
}

/* ===== Buttons ===== */
.btn-tickets-primary {
    background: linear-gradient(135deg, #00a0e3 0%, #33b5e5 100%);
    color: #fff !important;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-tickets-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.4);
    text-decoration: none !important;
    color: #fff !important;
}

.btn-tickets-primary.btn-tickets-large {
    padding: 16px 40px;
    font-size: 16px;
    border-radius: 8px;
}

.btn-tickets-primary i {
    font-size: 18px;
}

.btn-tickets-secondary {
    background: #6c757d;
    color: #fff !important;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-tickets-secondary:hover {
    background: #5a6268;
}

.btn-tickets-danger {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-tickets-danger:hover {
    background: #c82333;
}

/* ===== History Section ===== */
.ticket-history-section {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 25px;
    margin-bottom: 25px;
}

.ticket-history-section h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.ticket-history-item {
    padding: 12px 15px;
    border-left: 3px solid #e9ecef;
    margin-bottom: 12px;
    background: #f8f9fa;
    border-radius: 4px;
}

.ticket-history-item:last-child {
    margin-bottom: 0;
}

.ticket-history-time {
    font-size: 13px;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 5px;
}

.ticket-history-text {
    font-size: 14px;
    color: #2c3e50;
}

/* ===== Alerts ===== */
.tickets-alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tickets-alert-success {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.tickets-alert-danger {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.tickets-alert-warning {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.tickets-alert-info {
    background: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

/* ===== Closed Ticket Notice ===== */
.ticket-closed-notice {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #fff;
    padding: 20px 25px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.ticket-closed-notice h4 {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 600;
}

.ticket-closed-notice p {
    margin: 0;
    font-size: 15px;
    opacity: 0.95;
}

/* ===== MESSENGER-STYLE CHAT WINDOW ===== */
.messenger-chat-window {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 700px;
    margin-bottom: 20px;
}

.messenger-chat-header {
    background: linear-gradient(135deg, #00a0e3 0%, #33b5e5 100%);
    color: white;
    padding: 16px 20px;
    font-weight: 600;
    font-size: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.messenger-chat-header i {
    margin-right: 8px;
}

.messenger-chat-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
    scroll-behavior: smooth;
    position: relative;
}

.messenger-chat-body::-webkit-scrollbar {
    width: 8px;
}

.messenger-chat-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.messenger-chat-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.messenger-chat-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.messenger-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 40px 20px;
}

/* ===== CHAT MESSAGES ===== */
.b4chat-message {
    margin-bottom: 16px;
    display: flex;
    animation: messageSlideIn 0.3s ease-out;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.b4chat-message-user {
    justify-content: flex-end;
}

.b4chat-message-user .b4chat-message-content {
    background: linear-gradient(135deg, #00a0e3 0%, #33b5e5 100%);
    color: white;
    border-radius: 18px;
    border-bottom-right-radius: 4px;
    padding: 12px 16px;
    max-width: 70%;
    min-width: 200px;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.b4chat-message-organizer,
.b4chat-message-admin {
    justify-content: flex-start;
}

.b4chat-message-organizer .b4chat-message-content,
.b4chat-message-admin .b4chat-message-content {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    padding: 12px 16px;
    max-width: 70%;
    min-width: 200px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.b4chat-message-user .b4chat-message-content a {
    color: white;
    text-decoration: underline;
}

.b4chat-message-user > div {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.b4chat-message-organizer .b4chat-message-content a,
.b4chat-message-admin .b4chat-message-content a {
    color: #00a0e3;
    text-decoration: underline;
}

.b4chat-message-content {
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.b4chat-message-time {
    margin-top: 4px;
    font-size: 11px;
    color: #666;
    padding: 0 4px;
}

.b4chat-message-user .b4chat-message-time {
    text-align: right;
}

.b4chat-message-admin .b4chat-message-time,
.b4chat-message-organizer .b4chat-message-time {
    text-align: left;
}

/* Message attachments */
.ticket-message-attachments {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.b4chat-message-user .ticket-message-attachments {
    border-top-color: rgba(255, 255, 255, 0.3);
}

.b4chat-message-organizer .ticket-message-attachments,
.b4chat-message-admin .ticket-message-attachments {
    border-top-color: rgba(0, 0, 0, 0.1);
}

.ticket-message-attachments small {
    opacity: 0.8;
}

.attachment-image-link img {
    max-width: 100px;
    max-height: 100px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}

.attachment-image-link img:hover {
    transform: scale(1.05);
}

/* ===== MESSENGER-STYLE REPLY FORM ===== */
.messenger-reply-container {
    background: white;
    border-top: 1px solid #e0e0e0;
    padding: 12px 16px;
    flex-shrink: 0;
}

.messenger-input-wrapper {
    display: flex;
    gap: 8px;
    margin-bottom: 0;
}

.messenger-action-btn {
    background: transparent;
    border: none;
    color: #00a0e3;
    font-size: 24px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.messenger-action-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    color: #0077a3;
}

.messenger-action-btn:active {
    transform: scale(0.95);
}

.messenger-textarea {
    flex: 1;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 14px;
    line-height: 1.4;
    resize: none;
    min-height: 40px;
    max-height: 150px;
    overflow-y: auto;
    transition: border-color 0.2s;
    font-family: inherit;
    width: 100%;
}

.messenger-textarea:focus {
    outline: none;
    border-color: #00a0e3;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.messenger-textarea::placeholder {
    color: #999;
}

.messenger-send-btn {
    background: linear-gradient(135deg, #00a0e3 0%, #33b5e5 100%);
    border: none;
    color: white;
    font-size: 18px;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    flex-shrink: 0;
}

.messenger-send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.messenger-send-btn:active {
    transform: translateY(0);
}

.messenger-send-btn i {
    margin-left: 2px;
}

/* Expandable options */
.messenger-options-panel {
    margin-top: 12px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    animation: slideDownPanel 0.3s ease-out;
}

@keyframes slideDownPanel {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.messenger-attachments-section {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.messenger-attachments-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.messenger-options-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.messenger-options-actions:last-child {
    margin-bottom: 0;
}

.messenger-options-actions .btn {
    border-radius: 8px;
    font-size: 13px;
}

/* Closed ticket */
.messenger-reply-container.messenger-closed {
    text-align: center;
    padding: 20px;
}

.messenger-closed-message {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 10px;
}

/* ===== HISTORY ACCORDION ===== */
.ticket-history-section {
    margin-top: 30px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ticket-history-header {
    background: linear-gradient(135deg, #00a0e3 0%, #33b5e5 100%);
    color: white;
    padding: 14px 18px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: all 0.3s;
    border-radius: 12px;
}

.ticket-history-header:hover {
    background: linear-gradient(135deg, #5558e6 0%, #7a4ab5 100%);
}

.ticket-history-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: white;
}

.ticket-history-toggle {
    font-size: 18px;
    transition: transform 0.3s;
}

.ticket-history-toggle.open {
    transform: rotate(180deg);
}

.ticket-history-body {
    display: none;
    background: #fff;
    padding: 16px;
}

.ticket-history-item {
    padding: 12px;
    border-left: 3px solid #00a0e3;
    margin-bottom: 12px;
    background: #f8f9fa;
    border-radius: 4px;
}

.ticket-history-item:last-child {
    margin-bottom: 0;
}

.ticket-history-time {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.ticket-history-text {
    font-size: 14px;
    color: #333;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {

    .col-md-12 {
        padding-left: 5px !important;
        padding-right: 5px !important;
    }

    .no_main_block {
        padding: 0 !important;
    }

    .tickets-user-container {
        padding: 0 !important;
    }

    .ticket-form-card,
    .ticket-reply-container {
        padding: 20px;
    }

    .ticket-form-body {
        padding: 20px;
    }

    .ticket-form-actions {
        padding: 20px;
    }

    .ticket-form-section-title {
        font-size: 16px;
    }

    .btn-tickets-primary.btn-tickets-large {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
    }

    .ticket-detail-header {
        padding: 20px;
    }

    .ticket-detail-header h2 {
        font-size: 20px;
    }

    .ticket-info-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 20px;
    }

    .ticket-message.message-user {
        margin-right: 0;
    }

    .ticket-list-body {
        padding: 20px;
        overflow-x: auto;
    }

    .ticket-list-footer {
        padding: 15px;
    }

    .tickets-table {
        font-size: 11px;
    }

    .tickets-table thead th,
    .tickets-table tbody td {
        padding: 6px 4px !important;
        font-size: 11px;
    }

    .btn-tickets-view {
        padding: 5px 10px;
        font-size: 11px;
    }

    .ticket-empty-state {
        padding: 40px 15px;
    }

    .ticket-message.message-organizer,
    .ticket-message.message-admin {
        margin-left: 0;
    }

    .message-attachments-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .ticket-reply-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-tickets-primary,
    .btn-tickets-secondary,
    .btn-tickets-danger {
        width: 100%;
    }
}

/* ===== Form Field Styles ===== */
.form-group {
    width: 100%;
    margin-bottom: 0 !important;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-control {
    width: 100%;
    height: 100%;
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #00a0e3;
}

.form-control.error {
    border-color: #dc3545;
}

.help-block {
    font-size: 13px;
    color: #6c757d;
    margin-top: 5px;
}

.help-block.error {
    color: #dc3545;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* ===== Ticket List View ===== */
.ticket-list-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 30px;
}

.ticket-list-body {
    padding: 20px;
}

.ticket-list-footer {
    background: #f8f9fa;
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.ticket-empty-state {
    text-align: center;
    padding: 60px 20px;
}

.ticket-empty-state p {
    font-size: 16px;
    color: #6c757d;
    margin: 15px 0 25px 0;
}

/* ===== Tickets Table ===== */
.tickets-table {
    width: 100%;
    font-size: 12px;
    border-collapse: collapse;
}

.tickets-table thead th,
table.dataTable thead th {
    background: linear-gradient(135deg, #00a0e3 0%, #33b5e5 100%) !important;
    color: #fff !important;
    font-weight: 600;
    padding: 10px 8px !important;
    text-align: center;
    vertical-align: middle;
    border: none !important;
    font-size: 12px;
}

.tickets-table tbody td,
table.dataTable tbody td {
    padding: 8px 6px !important;
    text-align: center;
    vertical-align: middle;
    border-color: #e9ecef;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
}

.tickets-table tbody tr {
    transition: background-color 0.2s;
}

.tickets-table tbody tr:hover {
    background-color: #f8f9fc;
}

.tickets-table tbody tr:nth-child(even) {
    background-color: #fafafa;
}

.tickets-table tbody tr:nth-child(even):hover {
    background-color: #f8f9fc;
}

.tickets-table a {
    color: #00a0e3;
    text-decoration: none;
    font-weight: 500;
}

.tickets-table a:hover {
    color: #33b5e5;
    text-decoration: none !important;
}

/* ===== Ticket Status Badges ===== */
.ticket-status {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.ticket-status--new {
    background: #ffc107;
    color: #000;
}

.ticket-status--processing {
    background: #17a2b8;
    color: #fff;
}

.ticket-status--answer {
    background: #007bff;
    color: #fff;
}

.ticket-status--closed {
    background: #28a745;
    color: #fff;
}

.ticket-status--refused {
    background: #6c757d;
    color: #fff;
}

.ticket-status--default {
    background: #999;
    color: #fff;
}

/* ===== Tickets Table Buttons ===== */
.btn-tickets-view {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    color: #fff !important;
    background: linear-gradient(135deg, #00a0e3 0%, #33b5e5 100%);
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-tickets-view:hover {
    background: linear-gradient(135deg, #0077a3 0%, #7c3aed 100%);
    color: #fff !important;
    text-decoration: none !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.btn-tickets-view i {
    font-size: 12px;
}

/* Additional responsive styles for messenger chat */
@media (max-width: 768px) {
    .messenger-chat-window {
        height: 650px;
    }

    .messenger-chat-header {
        padding: 12px 16px;
        font-size: 15px;
    }

    .messenger-chat-body {
        padding: 12px;
    }

    .messenger-input-wrapper {
        gap: 6px;
    }

    .messenger-action-btn {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }

    .messenger-send-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .messenger-textarea {
        font-size: 14px;
        padding: 8px 14px;
    }

    .messenger-options-actions {
        flex-direction: column;
    }

    .messenger-options-actions .btn {
        width: 100%;
    }

    .b4chat-message-user .b4chat-message-content,
    .b4chat-message-organizer .b4chat-message-content,
    .b4chat-message-admin .b4chat-message-content {
        max-width: 85% !important;
        min-width: 120px !important;
        font-size: 15px !important;
        padding: 10px 14px !important;
    }

    .b4chat-message-time {
        font-size: 12px !important;
    }

    .ticket-info-panel {
        font-size: 14px;
    }

    .ticket-detail-header h2 {
        font-size: 20px !important;
    }
}
