/* === WhatsApp Chat Mockup Styles === */

.mockup-builder {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1rem;
}

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

/* === Message Form === */
.message-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
}

.message-form h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.form-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.form-row .input-group {
  flex: 1;
  margin-bottom: 0;
}

.sender-toggle {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.sender-toggle button {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-dim);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.sender-toggle button.active {
  background: var(--green-glow);
  border-color: var(--green);
  color: var(--green);
  font-weight: 600;
}

.message-list {
  max-height: 200px;
  overflow-y: auto;
  margin-top: 0.75rem;
}

.message-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
}

.message-list-item .msg-sender {
  color: var(--green);
  font-weight: 600;
  font-size: 0.75rem;
  margin-right: 0.5rem;
}

.message-list-item .msg-text {
  flex: 1;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-list-item .msg-remove {
  background: none;
  border: none;
  color: var(--red);
  cursor: pointer;
  font-size: 1rem;
  padding: 0 0.25rem;
  flex-shrink: 0;
}

/* === Chat Preview === */
.chat-preview-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
}

.chat-preview-container h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--text);
}

/* === WhatsApp Chat Frame === */
.wa-chat-frame {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  max-width: 360px;
  margin: 0 auto;
}

/* Header */
.wa-chat-header {
  background: #075e54;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.wa-chat-frame.dark-theme .wa-chat-header {
  background: #1f2c34;
}

.wa-chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #128c7e;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.wa-chat-frame.dark-theme .wa-chat-avatar {
  background: #2a3942;
}

.wa-chat-contact {
  flex: 1;
}

.wa-chat-contact-name {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
}

.wa-chat-contact-status {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
}

/* Chat Body */
.wa-chat-body {
  background: #ece5dd;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='a' width='20' height='20' patternUnits='userSpaceOnUse'%3E%3Ccircle cx='2' cy='2' r='0.5' fill='%23d1c4b2' opacity='0.3'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100' height='100' fill='url(%23a)'/%3E%3C/svg%3E");
  padding: 12px;
  min-height: 200px;
  max-height: 400px;
  overflow-y: auto;
}

.wa-chat-frame.dark-theme .wa-chat-body {
  background: #0b141a;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='a' width='20' height='20' patternUnits='userSpaceOnUse'%3E%3Ccircle cx='2' cy='2' r='0.5' fill='%23182229' opacity='0.5'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100' height='100' fill='url(%23a)'/%3E%3C/svg%3E");
}

.wa-chat-empty {
  text-align: center;
  color: #8e8e8e;
  font-size: 0.85rem;
  padding: 3rem 1rem;
  font-style: italic;
}

/* Message Bubbles */
.wa-msg {
  max-width: 85%;
  padding: 6px 10px 4px;
  border-radius: 8px;
  margin-bottom: 4px;
  position: relative;
  font-size: 0.9rem;
  line-height: 1.4;
  word-wrap: break-word;
  clear: both;
}

.wa-msg-sent {
  background: #dcf8c6;
  color: #111;
  margin-left: auto;
  border-top-right-radius: 0;
}

.wa-chat-frame.dark-theme .wa-msg-sent {
  background: #005c4b;
  color: #e9edef;
}

.wa-msg-received {
  background: #fff;
  color: #111;
  margin-right: auto;
  border-top-left-radius: 0;
}

.wa-chat-frame.dark-theme .wa-msg-received {
  background: #202c33;
  color: #e9edef;
}

.wa-msg-meta {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 3px;
  margin-top: 2px;
}

.wa-msg-time {
  font-size: 0.65rem;
  color: #999;
}

.wa-chat-frame.dark-theme .wa-msg-time {
  color: rgba(255, 255, 255, 0.45);
}

.wa-msg-status {
  font-size: 0.7rem;
  color: #999;
}

.wa-msg-status.read {
  color: #53bdeb;
}

/* === Customization Panel === */
.customization-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.customization-row .input-group {
  flex: 1;
  min-width: 120px;
  margin-bottom: 0;
}

.theme-select {
  display: flex;
  gap: 0.25rem;
}

.theme-select button {
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-dim);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.theme-select button.active {
  background: var(--green-glow);
  border-color: var(--green);
  color: var(--green);
}

/* === Export Section === */
.export-section {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
}
