/* Conversations - Light Theme Override */

/* Light theme for messages */
.call-window .message {
  margin: 4px 0 !important;
  padding: 6px 8px !important;
  border-radius: 12px !important;
  max-width: 95% !important;
  word-wrap: break-word !important;
  font-size: 9px !important;
  line-height: 1.2 !important;
}

/* User messages - Blue accent */
.call-window .message.user {
  background: #0066cc !important;
  color: white !important;
  margin-left: auto !important;
  text-align: right !important;
}

/* Agent messages - Light gray */
.call-window .message.agent {
  background: #f3f4f6 !important;
  color: #374151 !important;
  margin-right: auto !important;
  border: 1px solid #e5e7eb !important;
}

/* System messages - Very light gray */
.call-window .message.system {
  background: #f9fafb !important;
  color: #6b7280 !important;
  text-align: center !important;
  font-style: italic !important;
  margin: 4px auto !important;
  max-width: 80% !important;
  font-size: 8px !important;
  border: 1px solid #e5e7eb !important;
}

/* Timestamps */
.call-window .message .timestamp {
  font-size: 7px !important;
  color: #9ca3af !important;
  margin-top: 2px !important;
  opacity: 0.8 !important;
}

.call-window .message.user .timestamp {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: normal !important;
  opacity: 1 !important;
}

/* Modal overlay for expanded window */
.conversations-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 9998;
  display: none;
  backdrop-filter: blur(4px);
}

.conversations-modal-overlay.active {
  display: block;
}

/* Expanded window as modal */
.call-window.expanded {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 700px !important;
  max-width: 90vw !important;
  height: 85vh !important;
  z-index: 9999 !important;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5) !important;
  opacity: 1 !important;
  background: white !important;
  border: 2px solid var(--brand-primary) !important;
}

.call-window.expanded .chat-container {
  max-height: calc(85vh - 120px) !important;
  background: white !important;
}

.call-window.expanded .call-header {
  background: var(--brand-primary) !important;
  color: white !important;
  position: relative;
}

.call-window.expanded .call-info h3 {
  font-size: 16px !important;
  color: white !important;
}

.call-window.expanded .call-info p {
  font-size: 13px !important;
  color: rgba(255, 255, 255, 0.9) !important;
}

.call-window.expanded .status {
  background: rgba(255, 255, 255, 0.2) !important;
  color: white !important;
  font-size: 10px !important;
}

/* Close button for expanded window */
.call-window.expanded .call-header::after {
  content: '✕';
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 24px;
  color: white;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.2s;
}

.call-window.expanded .call-header::after:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

/* Larger text in expanded modal */
.call-window.expanded .message {
  font-size: 12px !important;
  padding: 10px 14px !important;
  margin: 6px 0 !important;
}

.call-window.expanded .message .timestamp {
  font-size: 10px !important;
}

/* Light background for chat in normal view */
.call-window .chat-container {
  background: white !important;
  border-top: 1px solid #e5e7eb;
}

/* "Brak wiadomości" styling */
.call-window .no-messages {
  color: #9ca3af !important;
  font-size: 10px !important;
}

/* Active call - Blue header */
.call-window.active .call-header {
  background: #0066cc !important;
  color: white !important;
}

.call-window.active .call-info h3 {
  color: white !important;
}

.call-window.active .call-info p {
  color: rgba(255, 255, 255, 0.95) !important;
}

.call-window.active .status {
  background: rgba(255, 255, 255, 0.25) !important;
  color: white !important;
}

/* Layout fix - text below instead of next to */
.call-window .call-info {
  display: block !important;
}

.call-window .call-info h3 {
  display: block !important;
  margin-bottom: 4px !important;
}

.call-window .call-info p {
  display: block !important;
  margin: 0 !important;
}

.call-window .call-info .call-duration {
  display: block !important;
  margin-top: 2px !important;
}

.call-window .call-info .call-time-info {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin-top: 4px !important;
  flex-wrap: wrap !important;
}

.call-window .call-info .call-date-time {
  font-size: 9px !important;
  color: #6b7280 !important;
  line-height: 1.3 !important;
}

.call-window .call-info .call-duration-badge {
  display: inline-block !important;
  background: var(--brand-primary) !important;
  color: white !important;
  padding: 3px 8px !important;
  border-radius: var(--radius-md) !important;
  font-size: 9px !important;
  font-weight: 600 !important;
  font-family: var(--font-mono) !important;
  letter-spacing: 0.5px !important;
}

.call-window.expanded .call-info .call-duration-badge {
  font-size: 11px !important;
  padding: 4px 10px !important;
}

.call-window .call-info .call-waiting {
  display: block !important;
  font-size: 9px !important;
  line-height: 1.3 !important;
}

/* Call header actions container */
.call-header-actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

/* Copy transcript button */
.copy-transcript-btn {
  background: rgba(255, 255, 255, 0.2) !important;
  border: none !important;
  color: white !important;
  padding: 6px 10px !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  font-size: 14px !important;
  transition: all 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 32px !important;
  height: 28px !important;
}

.copy-transcript-btn:hover {
  background: rgba(255, 255, 255, 0.3) !important;
  transform: scale(1.1) !important;
}

.copy-transcript-btn:active {
  transform: scale(0.95) !important;
}

/* Expanded window - adjust button position */
.call-window.expanded .call-header-actions {
  gap: 10px !important;
}

.call-window.expanded .copy-transcript-btn {
  font-size: 16px !important;
  padding: 8px 12px !important;
  min-width: 36px !important;
  height: 32px !important;
}

/* Project badge for multi-tenant */
.project-badge {
  display: inline-block !important;
  background: rgba(255, 255, 255, 0.25) !important;
  color: white !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
  font-size: 8px !important;
  font-weight: 600 !important;
  margin-right: 6px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.3px !important;
}

.call-window.archived .project-badge,
.call-window.empty .project-badge {
  background: rgba(0, 0, 0, 0.1) !important;
  color: #6b7280 !important;
}

.call-window.expanded .project-badge {
  font-size: 10px !important;
  padding: 3px 8px !important;
}
