/* Ticket Tabs */
.at-tabs {
    display: flex;
    margin-bottom: 20px;
}
.at-tab-button {
    flex: 1;
    padding: 12px;
    cursor: pointer;
    background: #d7d7d7;
    border: 1px solid #F2F4F7;
    font-weight: bold;
    color: #000000;
    text-align: center;
    user-select: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.at-tab-button.active {
    background: #0073aa;
    color: #fff;
    border-bottom: none;
}

/* Tab content */
.at-tab-content {
    display: none;
}
.at-tab-content.active {
    display: block;
    border-radius: 5px;
    margin-top: 35px;
}

/* Ticket List */
#at-ticket-list ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

#at-ticket-list ul li {
    display: flex;
    align-items: flex-start;
    padding: 10px;
    margin-bottom: 10px;
    background: #ffffff;
    border-radius: 5px;
    transition: background-color 0.3s ease;
	gap: 10px;
}

#at-ticket-list ul li:hover {
    background: #f1f1f1;
}

/* Ticket count number */
#at-ticket-list .count_ticket {
    flex-shrink: 0;
    font-size: 28px;
    font-weight: 700;
    color: #0073aa;
    width: 50px;
    text-align: center;
    user-select: none;
}

/* Ticket title and link */
#at-ticket-list a {
    font-size: 16px;
    font-weight: 600;
    color: #000000;
    text-decoration: none;
    transition: color 0.3s ease;
}

#at-ticket-list a:hover {
    color: #0073aa;
}

/* Ticket meta info */
#at-ticket-list .meta_values {
    opacity: 0.6;
    margin-top: 4px;
}

#at-ticket-list .meta_values small {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    font-size: 13px;
    color: #555;
}

/* Badge styles for status and priority */
.ticket-status,
.ticket-priority {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #fff;
    display: inline-block;
    font-weight: 600;
    user-select: none;
}

/* Default colors, adjust dynamically in your PHP */
.ticket-status.open { background-color: #28a745; }      /* green */
.ticket-status.pending { background-color: #ffc107; }   /* yellow */
.ticket-status.closed { background-color: #dc3545; }    /* red */
.ticket-status.resolved { background-color: #17a2b8; }  /* blue */

.ticket-priority.high { background-color: #dc3545; }    /* red */
.ticket-priority.medium { background-color: #ffc107; }  /* yellow */
.ticket-priority.low { background-color: #28a745; }     /* green */

/* Load More Button */
.at-load-more {
    margin-top: 20px;
    cursor: pointer;
    display: inline-block;
    padding: 12px 28px;
    background: #0073aa;
    color: #fff;
    font-weight: 600;
    font-size: 16px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 115, 170, 0.3);
    text-align: center;
    user-select: none;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    user-select: none;
}

.at-load-more:hover {
    background-color: #005f8d;
    box-shadow: 0 6px 12px rgba(0, 95, 141, 0.4);
}


/*Ticket Indivusual Records*/
.ticket-info-container {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5em;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
	gap: 40px;
}

.ticket-id {
    font-size: 28px;
    font-weight: 700;
    color: #0073aa;
    width: 50px;
    text-align: center;
}

.ticket-details {
    flex-grow: 1;
    margin-left: 15px;
}

.ticket-title {
    margin-bottom: 6px;
    font-size: 18px;
    font-weight: 600;
    color: #000000;
	text-transform: math-auto;
}

.meta_values {
    color: #555;
    font-size: 13px;
	opacity: 0.6;
    font-weight: normal;
}

.ticket-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
	font-size: 13px;
}

/*****
Reply
******/
.ticket-message {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 40px;
}

.ticket-message .avatar {
  flex-shrink: 0;
}

.ticket-message .avatar {
	border-radius:45px;
}

.ticket-message .content {
  flex: 1;
}

.ticket-message .header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ticket-message .header strong {
  font-size: 16px;
}

.ticket-message .header small {
  color: #888;
}

.ticket-message .body {
  margin-top: 8px;
  background: #f8f9fa;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  white-space: pre-line; /* keeps line breaks */
}

#at-tab-conversation {
    background: #f9fafe;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

#at-close-thread {
    text-align: right;
    font-weight: 600;
    cursor: pointer;
}

#ticket-info-container {
    margin-bottom: 15px;
    font-size: 16px;
    color: #333;
}

#at-reply-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#at-reply-form label {
    display: flex;
    align-items: center;
    font-weight: 500;
    font-size: 14px;
    color: #444;
}

#at-reply-form input[type="checkbox"] {
    margin-right: 8px;
}

#at-reply-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    resize: vertical;
    font-size: 14px;
}

#at-reply-form input[type="submit"] {
    align-self: flex-start;
    background-color: #0073aa;
    border: none;
    padding: 10px 18px;
    font-weight: bold;
    border-radius: 6px;
    font-size: 14px;
}

#at-ticket-thread {
    max-height: 500px;
    overflow-y: auto;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e0e6ed;
    font-size: 14px;
    line-height: 1.6;
}