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

body {
  font-family: Arial, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color: #f0f0f0;
}

.version-1-0-0 {

}

.btn-round {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.btn-round .fas {
  color: black;
}

.btn-success .fa-paper-plane {
  color: #fff !important;
}

#phoneForm button[type="submit"] .fa-paper-plane {
  color: #000 !important;
}

#messageText {
  resize: none;
  overflow-y: hidden;
  padding-right: 60px;
  min-height: 50px;
  display: flex;
  align-items: center;
}

#phoneForm button[type="submit"] {
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000 !important;
}

.iti {
  width: 100%;
}

#contactsList li {
  cursor: pointer;
}

#contactsList li:hover {
  background-color: #f1fdf6;
}

#toggleAddContact .icon-more,
#toggleContacts .icon-group,
#saveContact,
#cancelContact {
  color: #000 !important;
}

#toggleContacts {
  border-radius: 10px !important;
}

#toggleAddContact {
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 10px !important;
}

.chat-wrapper {
  max-width: 520px;
  width: 100%;
  background: #fff;
  padding: clamp(16px, 5vw, 28px);
  border: 1px solid #198754;
  border-radius: 18px;
  box-shadow: 0 4px 14px -4px rgba(0, 0, 0, .15);
  margin: clamp(12px, 4vh, 40px) auto;
}

.app-title {
  font-family: 'Brush Script MT', cursive;
  font-size: clamp(1.9rem, 7vw, 2.6rem);
  color: #5a5a5a;
  margin: 0;
}

.accent-letter {
  color: #ba1414;
}

.feedback {
  color: #198754;
  font-size: .95rem;
  min-height: 1.2em;
}

.input-lg {
  font-size: 1.05rem;
  padding: 14px 14px;
  border-radius: 12px;
}

.input-md {
  font-size: 1rem;
  padding: 12px 12px;
  border-radius: 10px;
}

.textarea-wrapper {
  position: relative;
  display: flex;
  align-items: stretch;
}

.textarea-wrapper textarea {
  resize: none;
  padding-right: 64px;
  min-height: 48px;
  line-height: 1.35;
}

.btn-round.btn-send {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: 0 4px 10px -2px rgba(0, 0, 0, .22);
}

.btn-touch,
.btn-touch-min {
  min-width: 54px;
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border-radius: 14px;
  padding: 0 14px;
}

.btn-touch-min {
  min-width: 44px;
  min-height: 44px;
  font-size: .95rem;
  padding: 0 18px;
}

.btn-touch i,
.btn-touch-min i {
  pointer-events: none;
}

.add-contact-panel {
  background: #f8fdf9;
  border: 1px solid #d8efe1;
  border-radius: 14px;
  padding: 14px 16px 18px;
  margin-bottom: 14px;
}

.contacts-scroll {
  max-height: 240px;
  overflow-y: auto;
  margin-top: 10px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #d8efe1;
  padding: 0;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: #25d366 #e9f8f1;
}

.contacts-scroll::-webkit-scrollbar {
  width: 11px;
}

.contacts-scroll::-webkit-scrollbar-track {
  background: #e9f8f1;
  border-radius: 20px;
}

.contacts-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #25d366, #128c7e);
  border-radius: 20px;
  border: 2px solid #e9f8f1;
}

.contacts-scroll::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #21c65d, #0f7463);
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px 10px 12px;
  border-bottom: 1px solid #edf7f1;
  background: #fff;
  cursor: pointer;
  transition: background .12s ease;
}

.contact-row:last-child {
  border-bottom: none;
}

.contact-row:hover {
  background: #f5fbf8;
}

.contact-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(145deg, #e1f9ed, #c8f0dc);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: .9rem;
  color: #075E54;
  box-shadow: 0 2px 4px -2px rgba(0, 0, 0, .18);
  flex-shrink: 0;
  letter-spacing: .5px;
  user-select: none;
}

.contact-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.contact-info .c-name {
  font-weight: 600;
  font-size: .93rem;
  color: #1d1d1d;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-info .c-phone {
  font-size: .72rem;
  color: #5d6b65;
  margin-top: 4px;
  letter-spacing: .4px;
}

/* Ajuste para remover estilos Bootstrap list-group */
#contactsList .list-group-item,
#contactsList .list-group-item-action {
  border: none;
  background: transparent;
  padding: 0;
}

/* Accesibilidad táctil */
button,
.btn,
input,
textarea {
  touch-action: manipulation;
}

/* Pequeñas pantallas extra */
@media (max-width:380px) {
  .btn-round.btn-send {
    width: 48px;
    height: 48px;
    font-size: 1rem;
  }

  .input-lg {
    font-size: 1rem;
    padding: 12px 12px;
  }

  .chat-wrapper {
    padding: 16px 14px;
  }
}

/* Auto crecimiento textarea (JS puede ajustar altura) */
.auto-resize {
  overflow: hidden;
}

/* Preferencia de reducción de movimiento */
@media (prefers-reduced-motion:reduce) {
  * {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
  }
}

/* Ensure all buttons have black text (including icons) */
.btn,
.btn i,
.btn:focus,
.btn:active {
  color: #000 !important;
}


#saveContact {
  color: #000 !important;
}



.input-error {
  border: 2px solid #e53935 !important;
}

.error-message {
  color: #e53935;
  font-size: 0.95em;
  margin-top: 4px;
  margin-bottom: 0;
}