.smart-wrapper {
  max-width: 1050px;
  margin: 5px auto 40px;
  padding: 0 20px;
  min-height: 100vh;
}

.modal-content {
  padding-left: 0;
  padding-right: 0;
}

#patientChatModal {
  padding-top: 25%;
}

.badge-success {
  line-height: normal;
}

.badge-primary {
  line-height: normal;
}

.badge-warning {
  line-height: normal;
}

.badge-info {
  line-height: normal;
}

.badge-light {
  line-height: normal;
}

.chat-container {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.left-panel {
  width: 28%;
  background: #fff;
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

.left-panel button {
  width: 100%;
  padding: 14px;
  border-radius: 30px;
  font-size: 16px;
  border: 1px solid #dcdcdc;
  background: #fff;
  cursor: pointer;
  transition: 0.3s;
}

.gender-btn.active {
  background: #2f7df4;
  color: #fff;
  border-color: #2f7df4;
  box-shadow: 0 4px 12px rgba(47, 125, 244, 0.35);
}

.gender-btn.active:hover {
  background: #2f7df4;
  color: #fff;
}

.left-panel button:hover {
  background: #2f7df4;
  color: white;
}

.right-panel {
  width: 68%;
  background: #fff;
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  height: 550px;
  overflow: hidden;
  /* added */
}

#chatBox {
  flex: 1;
  overflow-y: auto !important;
  /* FIXED */
  overflow-x: hidden;
  max-height: 100% !important;
  /* FIXED */
  background: #f5f5f5;
  padding: 12px;
  border-radius: 10px;
  scroll-behavior: smooth;
  /* smoother scroll */
}

#optionsArea {
  margin-top: 20px;
  padding-bottom: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chat-bubble {
  max-width: 80%;
  margin-bottom: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 15px;
  display: inline-block;
}

.chat-bubble.system {
  background: #e8e8e8;
  color: #333;
  border-bottom-left-radius: 5px;
}

.chat-bubble.user {
  background: #2f7df4;
  color: #fff;
  margin-left: auto;
  border-bottom-right-radius: 4px;
}

.option-btn {
  display: inline-block;
  padding: 10px 18px;
  margin: 6px 6px 0 0;
  background: linear-gradient(90deg, #eef2ff, #dbeafe);
  border: 2px solid #3b82f6;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #1e3a8a;
  transition: 0.25s ease;
  white-space: nowrap;
}

.option-btn:hover {
  background: #3b82f6;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0px 4px 10px rgba(59, 130, 246, 0.25);
}

.typing {
  opacity: 0.6;
  animation: blink 1.1s infinite;
}

.message-body-custom {
  padding: 16px;
}

@keyframes blink {
  50% {
    opacity: 1;
  }
}

.guidance-header {
  text-align: center;
  padding: 25px 20px;
  background: #f7f7f7;
  border-radius: 10px;
  margin: 20px auto 30px auto;
  width: 90%;
  max-width: 900px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.guidance-header h2 {
  font-size: 26px;
  font-weight: 700;
  color: #222;
  margin-bottom: 10px;
}

.guidance-header p {
  font-size: 10px;
  line-height: 1.6;
  color: #444;
  max-width: 800px;
  margin: 0 auto;
}

/* chatmodal */

/* Patient chat specific styles */

#patientChatModal .modal-dialog {
  max-width: 800px;
}

#patientChatModal .modal-body {
  padding: 20px;
}

#patientChatMessages {
  min-height: 400px;
  background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
}

.message {
  animation: fadeIn 0.3s ease-in;
}

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

/* Chat messages container scrollbar */

#patientChatMessages {
  scrollbar-width: thin;
  scrollbar-color: #adb5bd #f8f9fa;
}

#patientChatMessages::-webkit-scrollbar {
  width: 6px;
}

#patientChatMessages::-webkit-scrollbar-track {
  background: #f8f9fa;
}

#patientChatMessages::-webkit-scrollbar-thumb {
  background-color: #adb5bd;
  border-radius: 3px;
}

/* Chat button in table */

.open-patient-chat-btn {
  transition: all 0.3s ease;
  cursor: pointer !important;
}

.open-patient-chat-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Message styling */

.message-sent {
  text-align: right;
}

.message-sent .message-body {
  background-color: #28a745;
  color: white;
  border-bottom-right-radius: 0;
}

.message-received .message-body {
  background-color: #ffffff;
  color: #333;
  border: 1px solid #dee2e6;
  border-bottom-left-radius: 0;
}

.message-body {
  max-width: 80%;
  display: inline-block;
  border-radius: 15px;
  word-wrap: break-word;
}

.message-header {
  font-size: 0.8rem;
}

.system-message .message-body {
  background-color: #f8f9fa;
  max-width: 100%;
  font-size: 0.85rem;
}

/* Button states */

#patientSendChatBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Toastr custom styling */

.toast-warning {
  background-color: #e51010ff !important;
  color: #333 !important;
}

.toast-warning .toast-title {
  font-weight: bold;
  color: #333;
}

.toast-warning .toast-message {
  color: #333;
}

/* Reports Modal Styling */

#reportsList tr:hover {
  background-color: #f8f9fa;
}

/* Upload Progress Bar */

#uploadProgressContainer {
  border-radius: 5px;
  overflow: hidden;
}

#uploadProgressBar {
  transition: width 0.3s ease;
}

/* File Icons */

.fa-file-pdf {
  color: #e74c3c;
}

.fa-file-image {
  color: #2ecc71;
}

.fa-file-word {
  color: #3498db;
}

.fa-file-excel {
  color: #27ae60;
}

.fa-file-alt {
  color: #7f8c8d;
}

/* Button Group */

.btn-group-sm .btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

/* Responsive Tables */

@media (max-width: 768px) {
  .table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* YD-13-1-2026 */

/* ===============================
   RESPONSIVE ADD-ON (NON-BREAKING)
   =============================== */

/* Tablets & below */

@media (max-width: 992px) {
  .smart-wrapper-responsive {
    padding: 0 15px;
    min-height: auto;
  }
  .chat-container-responsive {
    flex-direction: column;
    gap: 15px;
  }
  .left-panel-responsive,
  .right-panel-responsive {
    width: 100%;
  }
  .right-panel-responsive {
    height: 520px;
  }
}

/* Mobile devices */

@media (max-width: 768px) {
  .guidance-header {
    padding: 20px 15px;
    width: 95%;
  }
  .guidance-header h2 {
    font-size: 22px;
  }
  .guidance-header p {
    font-size: 13px;
  }
  .left-panel-responsive {
    padding: 15px;
  }
  .left-panel-responsive h4 {
    font-size: 16px;
    text-align: center;
  }
  .left-panel-responsive button {
    font-size: 14px;
    padding: 12px;
  }
  .right-panel-responsive {
    padding: 15px;
    height: 480px;
  }
  .chatbox-responsive {
    padding: 10px;
  }
  .chat-bubble {
    font-size: 14px;
    max-width: 90%;
  }
  .options-area-responsive {
    gap: 8px;
    padding-bottom: 20px;
  }
  .option-btn {
    font-size: 13px;
    padding: 8px 14px;
  }
}

/* Small mobile devices */

@media (max-width: 576px) {
  .guidance-header h2 {
    font-size: 20px;
  }
  /* .right-panel-responsive {
        height: 420px;
    } */
  .chat-bubble {
    font-size: 13px;
  }
  .option-btn {
    font-size: 12px;
    padding: 7px 12px;
  }
  .message-body-custom {
    padding: 5px;
    font-size: 10px;
  }
  .custom-title {
    font-size: 16px;
  }
}

/* Chat modal responsiveness */

@media (max-width: 768px) {
  #patientChatModal .modal-dialog {
    max-width: 95%;
    margin: 10px auto;
  }
  #patientChatMessages {
    min-height: 300px;
  }
}
