/**
 * Bhaktapur Doctors Society Theme Custom Styles
 * Fully styled for standalone WordPress theme installation
 */

/* Grid and Container Helpers */
.bds-container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  box-sizing: border-box;
}

/* Primary Button */
.bds-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: #059669;
  color: #ffffff !important;
  font-weight: 700;
  border-radius: 0.75rem;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 6px -1px rgba(5, 150, 105, 0.2), 0 2px 4px -2px rgba(5, 150, 105, 0.2);
  border: none;
  cursor: pointer;
  padding: 0.65rem 1.25rem;
  font-size: 0.85rem;
}

.bds-btn-primary:hover {
  background-color: #047857;
  transform: translateY(-1px);
  box-shadow: 0 6px 12px -2px rgba(5, 150, 105, 0.25);
  color: #ffffff !important;
}

.bds-btn-primary:active {
  transform: translateY(0);
}

/* Doctor Card Styles */
.bds-doctor-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.25rem;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

.bds-doctor-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

/* Widget Areas */
.bds-widget {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.bds-widget-title,
.widget-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #0f172a;
  margin-bottom: 0.75rem;
}

/* Badges */
.bds-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  background-color: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

/* Modal Overlay & Dialog */
.bds-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.bds-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.bds-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  background: #ffffff;
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: bdsModalFadeIn 0.2s ease-out;
}

@keyframes bdsModalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Chat Header */
.bds-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: #0f172a;
  color: #ffffff;
  border-bottom: 1px solid #1e293b;
}

.bds-chat-header-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.bds-chat-avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}

.bds-chat-avatar {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  background: #059669;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid #10b981;
}

.bds-status-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 0.65rem;
  height: 0.65rem;
  background: #10b981;
  border: 2px solid #0f172a;
  border-radius: 9999px;
}

.bds-chat-header-meta {
  min-width: 0;
}

.bds-chat-doc-name-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.bds-chat-doc-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bds-chat-doc-sub {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.15rem;
}

.bds-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.bds-close-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

/* Chat Notice */
.bds-chat-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: #ecfdf5;
  border-bottom: 1px solid #d1fae5;
  font-size: 0.75rem;
  color: #065f46;
}

.bds-chat-notice-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

/* Chat Body / Messages */
.bds-chat-body {
  flex: 1;
  padding: 1.25rem;
  overflow-y: auto;
  min-height: 280px;
  max-height: 380px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.bds-msg {
  display: flex;
  flex-direction: column;
  max-width: 82%;
  animation: bdsMsgPop 0.15s ease-out;
}

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

.bds-msg-doctor {
  align-self: flex-start;
}

.bds-msg-patient {
  align-self: flex-end;
}

.bds-msg-bubble {
  padding: 0.65rem 0.9rem;
  border-radius: 0.85rem;
  font-size: 0.825rem;
  line-height: 1.45;
  word-break: break-word;
}

.bds-msg-doctor .bds-msg-bubble {
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  border-bottom-left-radius: 0.2rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.bds-msg-patient .bds-msg-bubble {
  background: #059669;
  color: #ffffff;
  border-bottom-right-radius: 0.2rem;
}

.bds-msg-time {
  font-size: 0.65rem;
  color: #94a3b8;
  margin-top: 0.2rem;
  padding: 0 0.25rem;
}

.bds-msg-patient .bds-msg-time {
  text-align: right;
}

/* Quick Query Chips */
.bds-chat-quick-queries {
  padding: 0.5rem 1rem;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
}

.bds-quick-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.bds-quick-chips {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.bds-chip {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

.bds-chip:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #0f172a;
}

/* Chat Footer Form */
.bds-chat-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
}

.bds-chat-footer input {
  flex: 1;
  padding: 0.65rem 0.85rem;
  font-size: 0.825rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.6rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.bds-chat-footer input:focus {
  border-color: #059669;
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.15);
}

.bds-chat-send-btn {
  background: #059669;
  color: #ffffff;
  border: none;
  padding: 0.65rem 1.1rem;
  border-radius: 0.6rem;
  font-size: 0.825rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: background-color 0.15s ease;
}

.bds-chat-send-btn:hover {
  background: #047857;
}

/* Typing Indicator Animation */
.bds-typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0.5rem 0.75rem;
  background: #f1f5f9;
  border-radius: 0.75rem;
}

.bds-typing-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #64748b;
  animation: bdsBlink 1.4s infinite both;
}

.bds-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.bds-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes bdsBlink {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1.1); }
}
