* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #e8e8e8;
  color: #333;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  background: #2c3e50;
  color: #ecf0f1;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  border-bottom: 2px solid #1a252f;
}

.header-left { font-weight: 600; }

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "SF Mono", "Consolas", monospace;
  font-size: 13px;
}

.call-status {
  color: #2ecc71;
  font-size: 12px;
  animation: blink 1.5s infinite;
}

.call-status-ended {
  color: #e74c3c;
  font-size: 12px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

main {
  display: flex;
  flex: 1;
  overflow: hidden;
}

#call-panel {
  width: 40%;
  background: #f4f4f4;
  border-right: 1px solid #ccc;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-header {
  background: #ddd;
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #666;
  border-bottom: 1px solid #ccc;
}

.call-info {
  padding: 12px 16px;
  border-bottom: 1px solid #ccc;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 13px;
}

.info-label { color: #888; font-size: 12px; }
.info-value { font-weight: 500; }

.conversation-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#conversation-log {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
}

/* Chat bubble styles */
.log-entry {
  padding: 8px 12px;
  margin-bottom: 6px;
  border-radius: 6px;
  font-size: 13px;
  max-width: 90%;
  clear: both;
}

.log-customer {
  background: #f0f0f0;
  border: 1px solid #ddd;
  float: left;
}

.log-agent {
  background: #dce9f9;
  border: 1px solid #b8d4f0;
  float: right;
  text-align: right;
}

.log-entry .timestamp {
  color: #999;
  font-size: 10px;
  margin-right: 6px;
  font-family: monospace;
}

/* Clearfix for floated log entries */
#conversation-log::after {
  content: "";
  display: table;
  clear: both;
}

.input-area {
  display: flex;
  gap: 6px;
  padding: 8px 16px;
  background: #eee;
  border-top: 1px solid #ccc;
}

#agent-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #bbb;
  border-radius: 4px;
  font-size: 13px;
  outline: none;
  background: #fff;
}

#agent-input:focus { border-color: #27ae60; }

#agent-send-btn {
  padding: 8px 16px;
  background: #27ae60;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
}

#agent-send-btn:hover { background: #219a52; }

#assist-panel {
  width: 60%;
  display: flex;
  flex-direction: column;
  background: #f0f0f0;
}

.iframe-label {
  padding: 6px 16px;
  font-size: 10px;
  color: #999;
  background: #e0e0e0;
  border-bottom: 1px solid #ccc;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#assist-iframe {
  flex: 1;
  border: none;
  width: 100%;
}
