/* style.css */
body {
  /* font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; */
  font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  background: #f5f5f5;
  margin: 0;
  padding: 0;
}

.admin-container {
  padding: 0 0px;
  /* max-width: 1200px; */
  margin: auto;
}
.header{
  background: #fff;
}
.header-inner, .rs-container {
 max-width: 1222px;
 margin: auto;
}
.header-inner{
      display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    margin-bottom: 30px;
    border-bottom: 1px solid #0000001a;
}
.header h1 {
    margin: 0;
    font-size: 16px;
    line-height: 26px;
    font-weight: 400;
}
.logo-title {
    display: flex;
    gap: 10px;
    align-items: center;
}
.logo-title svg {
    background: #000;
    color: #fff;
    padding: 8px;
    border-radius: 0.625rem;
}
.logout-button {
  padding: 8px 20px;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
      font-weight: 500;
      display: flex;
      align-items: center;
      gap: 10px;
}
button.logout-button svg {
    width: 18px;
    height: 18px;
}
.logout-button:hover {
  background: #c82333;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
  padding: 0 20px;
}

.stat-card {
  background: white;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #0000001a;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    transition: .3s ease;
}
.stat-card:hover {
    box-shadow: 3px 7px 10px 0px #00000014;
}
.stat-value {
    font-size: 32px;
    line-height: 42px;
    font-weight: 400;
    color: #000;
}
.stat-label {
  color: #717182;
}
.stat-right svg {
    padding: 10px;
    border-radius: 10px;
    background: #eff6ff;
    color: #155dfc;
}
.ec-icon svg {
    background: #fef2f2;
    color: #e7000b;
}
.tc-icon svg {
    background: #f0fdf4;
    color: #00a63e;
}
.mc-icon svg {
    background: #faf5ff;
    color: #9810fa;
}
.filters {
    padding: 0 20px;
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}
.search-export-wrap {
    display: flex;
    gap: 10px;
    align-items: center;
}
#searchBox {
    height: 35px;
    border-radius: 8px 0 0 8px;
    border: none;
    padding: 0px 15px;
    min-width: 200px;
    min-height: 40px;
}
.search-container {
    display: flex;
    align-items: center;
    gap: 0px;
}
input#searchBox:focus-visible, select:focus-visible {
    outline: none;
}
#searchBtn {
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 8px 8px 0;
}
button#searchBtn svg {
    color: #fff;
    width: 20px;
    height: 20px;
}
select {
    padding: 8px 10px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    min-width: 150px;
    min-height: 40px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: #fff;
     background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='20' height='20'%3E%3Cpath fill='gray' d='M6.29 8.71a1 1 0 011.41 0L12 13l4.29-4.29a1 1 0 111.41 1.41l-5 5a1 1 0 01-1.41 0l-5-5a1 1 0 010-1.41z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
}
select#filterSelect::before {
    content: "\f078";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #555;
    font-size: 14px;
}
.exportBtn svg {
    width: 18px;
    height: 18px;
}
label {
    font-weight: 500;
    font-family: inherit;
}
button {
    background: #667eea;
    color: white;
    border: none;
    cursor: pointer;
    padding: 8px 20px;
    color: white;
    border: none;
    border-radius: 8px; 
    cursor: pointer;
    font-size: 14px; 
    font-weight: 500;
    gap: 10px;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    min-height: 40px;
}

button:hover {
  background: #5a67d8;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 0 20px;
}

@media (max-width: 768px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
}

.conversations, .messages {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid #0000001a;
}

.panel-header {
  padding: 15px 20px;
  border-bottom: 1px solid #0000001a;
  font-weight: 500;
  display: flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
}
.panel-head-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.panel-head-right{
  display: flex;
    align-items: center;
    gap: 5px;
}
.panel-head-right button {
    font-size: 12px;
}

.empty-state-icon svg {
    width: 50px;
    color: #717182;
    height: 50px;
}
div#messagesContainer .empty-state-icon {
    background: #ececf0;
    padding: 20px;
    border-radius: 50px;
    display: flex;
}
#chatAssign{
  height: 34px;
  font-size: 12px;
  border: 1px solid #0000001a;
  padding-right: 35px;
}
.conversations-list, .messages-list {
  max-height: 500px;
  overflow-y: auto;
  padding: 15px;
}

.conversation-item {
    display: flex;
}

.conversation {
  border-bottom: 1px solid #eee;
  padding: 5px 15px;
  cursor: pointer;
  transition: background 0.2s;
  width: 100%;
  min-height: 50px;
}
.conversationRight {
    display: flex;
    flex-direction: column;
    text-align: right;
    width: 35%;
}
.conversationLeft {
    width: 70% !important;
}
.panel-header input, .conversation-item input {
    width: 20px;
    height: 20px;
}
.conversation-item input{
  margin-top: 5px;
}

.conversation:hover {
  background: #f8f9fa;
}

.conversation-checkbox:checked, #selectAll:checked {
      accent-color: #007bff;
    }
.conversation-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  gap: 20px;
}

.conversation-id {
  font-weight: 400;
  color: #333;
  font-size: 0.9em;
}

.conversation-time, .conversation-email {
  color: #666;
  font-size: 0.85em;
}
.conversationStatus, .chatAssignedTo {
    font-size: 12px;
    line-height: 16px;
}
.chatAssignedTo{
  color: rgba(131, 131, 131, 1);
}

.responded{
    color: green;
}
.closed{
    color: grey;
    display: none;
}

.message {
  margin-bottom: 15px;
  padding: 12px 15px;
  border-radius: 8px;
}

.message.user {
  background: #e3f2fd;
  margin-left: 20%;
}

.message.bot {
  background: #f5f5f5;
  margin-right: 20%;
}

.message-role {
  font-weight: bold;
  margin-bottom: 5px;
  font-size: 0.85em;
  color: #666;
}

.message-content {
  color: #333;
  line-height: 1.5;
}

.empty-state-icon {
  font-size: 2em;
  margin-bottom: 10px;
}

.markChatWrap{
  position: relative;
}

.markChatOptions {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    z-index: 100;
    min-width: 130px;
    list-style: none;
    padding: 0px;
    margin: 0;
}
.markItem {
    font-size: 12px;
    font-weight: 400;
    padding: 5px 10px;
    cursor: pointer;
}
.conversation-panel-head {
    display: flex;
    padding: 0px 40px;
    justify-content: space-between;
    padding: 10px 10px;
    border-bottom: 1px solid #0000001a;
}
.conversation-panel-head-item {
    line-height: 22px;
    font-size: 12px;
    font-weight: 700;
}

.tabs{
    margin: 0px;
    padding: 5px;
    list-style: none;
    width: 100%;
    display: flex;
    justify-content: space-between;
    background: #ececf0;
    border-radius: 20px;
}

.tabs li {
    display: inline-block;
    margin: 0;
    padding: 3px 20px 3px 20px;
    cursor: pointer;
    border-radius: 15px;
    width: -webkit-fill-available;
    text-align: center;
    font-weight: 500;
}

.tabs li.current{
   background: #fff;
}

.tab-content{
    display: none;
}

.tab-content.current{
    display: inherit;
}

   /* Loader styles */
      .loader {
        border: 3px solid #f3f3f3;
        border-top: 3px solid #667eea;
        border-radius: 50%;
        width: 30px;
        height: 30px;
        animation: spin 1s linear infinite;
        display: inline-block;
        margin-right: 10px;
      }

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

      .loading-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 40px;
        color: #666;
      }

      .search-results-info {
        padding: 10px;
        background: #e3f2fd;
        border-left: 4px solid #667eea;
        margin-bottom: 10px;
        font-size: 14px;
        color: #1976d2;
      }

      .empty-state {
      text-align: center;
    padding: 40px 20px;
    color: #999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
      }

      .empty-state i {
        font-size: 48px;
        margin-bottom: 15px;
        display: block;
      }

      .conversation.selected {
        background-color: #e3f2fd !important;
      }

      .start-date label {
    font-size: 12px;
    font-weight: 400;
    color: #717182;
        margin-bottom: 2px;
}
.start-date {
    display: flex;
    flex-direction: column;
}
.select-date-wrap {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}
#startDate, #endDate{
    padding: 8px 10px;
    border: none;
    border-radius: 8px;
}
#dateRangeFilter {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    margin-left: 10px;
}
button.dateApply {
    min-height: 35px !important;
}