@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap');

.zikichat-hidden { 
  display: none !important; 
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translate(-50%, -20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes slideUp {
  from {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -20px);
  }
}

#zikichat-widget {
   position: fixed;
  z-index: 9999;
  right: 20px;
  bottom: 20px;
  width: 300px;
  max-height: 480px;
  background: rgba(255,255,255,0.95);
  border-radius: 10px;
  border: 1px solid #ddd;
  box-shadow: 0px 0px 35px 0px rgba(255,255,255,1) inset;
  -webkit-box-shadow: 0px 0px 35px 0px rgba(255,255,255,1) inset;
  -moz-box-shadow: 0px 0px 35px 0px rgba(255,255,255,1) inset;
  display: flex;
  flex-direction: column;
  font-family: Arial, sans-serif;
}

.zc-chat-area {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.zc-header {
  padding: 10px;
  color: #210A74;
  background: rgba(255,255,255,.95);
  background: linear-gradient(to bottom,  rgba(255,255,255,1) 0%,rgba(255,255,255,1) 50%,rgba(255,255,255,0.5) 80%,rgba(255,255,255,0) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
  display:flex; justify-content:space-between; align-items:center; border-radius: 10px 10px 0 0;}

#zc-back,
#zc-close {
  background: none;
  border: none;
  color: #210A74;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  min-width: 24px;
  line-height: 1;
  font-weight: normal;
}

#zc-back {
  font-family: "Open Sans", sans-serif;
  font-weight: 300;
  font-size: 36px;
  min-width: 36px;
}

#zc-back:hover,
#zc-close:hover {
  opacity: 0.7;
}

.zc-form-body {
  padding: 20px;
  position: relative; /* For dropdown positioning */
  overflow-y: auto; /* Allow scrolling if content overflows */
  max-height: calc(480px - 50px); /* Modal height minus header */
}

.zc-form-body p {
  margin: 0 0 15px 0;
  font-size: 14px;
  color: #333;
}

.zc-form-body input,
.zc-form-body textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
  font-family: Arial, sans-serif;
}

.zc-form-body input:focus,
.zc-form-body textarea:focus {
  outline: none;
  border-color: #0b74de;
}

.zc-form-body textarea {
  resize: vertical;
  min-height: 100px;
}

.zc-input-error {
  border-color: #dc3545 !important;
  animation: shake 0.3s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.zc-error-tooltip {
  position: absolute;
  top: -35px;
  left: 0;
  right: 0;
  background: #dc3545;
  color: white;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 12px;
  z-index: 1000;
  animation: slideDown 0.3s ease;
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.zc-error-tooltip::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 20px;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #dc3545;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.zc-button-group {
  display: flex;
  gap: 10px;
  margin-top: 5px;
}

.zc-button-group button {
  flex: 1;
}

.zc-form-body button {
  width: 100%;
  padding: 10px;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.3s ease;
}

.zc-btn-email {
  background: #16A34A;
}

.zc-btn-email:hover {
  background: #15803d;
}

.zc-btn-chat {
  background: #0b74de;
}

.zc-btn-chat:hover {
  background: #095bb5;
}

.zc-btn-chat:disabled {
  background: #9ca3af;
  cursor: not-allowed !important;
  opacity: 0.5;
}

.zc-btn-chat:disabled:hover {
  background: #9ca3af;
}

.zc-attachment-section {
  margin: 10px 0;
}

.zc-btn-attachment {
  width: 100%;
  padding: 8px;
  background: #6b7280;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 8px;
}

.zc-btn-attachment:hover {
  background: #4b5563;
}

.zc-attachment-list {
  margin-top: 8px;
}

.zc-attachment-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0 0 12px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  margin-bottom: 5px;
  font-size: 12px;
}

.zc-attachment-item span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #16A34A !important;
  font-weight: 500;
  min-width: 0; /* Fix for flex text overflow */
  display: block;
  padding: 12px 0;
}

.zc-form-body button.zc-attachment-remove {
  background: #dc3545;
  color: white;
  border: none;
  padding: 10px 12px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
  margin-left: 6px;
  margin-right: 1px;
  min-width: 24px;
  width: auto;
}

.zc-attachment-remove:hover {
  background: #c82333;
}

.zc-messages { 
  padding: 10px; 
  overflow-y: auto; 
  flex: 1 1 auto; 
}

.zc-form { 
  display:flex; 
  padding: 8px; 
  border-top: 1px solid #eee; 
}

.zc-form input { 
  flex: 1 1 auto; 
  padding: 8px; 
  border: 1px solid #ccc; 
  border-radius: 10px; 
}

.zc-form button { 
  margin-left: 8px; 
  padding: 8px 12px; 
  background:#0b74de; 
  color:#fff; 
  border:none; 
  border-radius:10px; 
  cursor: pointer;
}

.zc-form button:hover {
  background: #095bb5;
}

.zc-emailed-notice {
  padding: 15px;
  background: #e8f4f8;
  border-top: 2px solid #0b74de;
  text-align: center;
}

.zc-emailed-notice p {
  margin: 0;
  font-size: 14px;
  color: #333;
  line-height: 1.5;
}

.zc-status { 
  padding: 6px 10px; 
  font-size: 12px; 
  color: #666; 
}

.zc-message { 
  margin-bottom: 15px; 
  clear: both;
}

.zc-message-visitor {
  text-align: left;
}

.zc-message-agent {
  text-align: right;
}

.zc-message-name {
  font-size: 11px;
  font-weight: 500;
  color: #210A74;
  margin-bottom: 4px;
  margin-right: 15px;
}

.zc-message-visitor .zc-message-name {
 margin-right: 0;
 margin-left: 5px;
}

.zc-message-text { 
  display: inline-block; 
  padding: 8px 12px; 
  border-radius: 12px;
  max-width: 70%;
  word-wrap: break-word;
}

.zc-message-visitor .zc-message-text { 
  background: #FCF8E3;
  color: #333;
  box-shadow: 2px 3px 8px -2px rgba(10,53,126,0.15);
  -webkit-box-shadow: 2px 3px 8px -2px rgba(10,53,126,0.15);
  -moz-box-shadow: 2px 3px 8px -2px rgba(10,53,126,0.15);
}

.zc-message-agent .zc-message-text { 
  background: #0b74de; 
  color: #fff;
  box-shadow: 2px 3px 8px -2px rgba(10,53,126,0.75);
  -webkit-box-shadow: 2px 3px 8px -2px rgba(10,53,126,0.75);
  -moz-box-shadow: 2px 3px 8px -2px rgba(10,53,126,0.75);
}

.zc-message-time {
  font-size: 11px;
  color: #210A74;
  margin-top: 4px;
  margin-right: 15px;
}

.zc-message-visitor .zc-message-time {
  margin-right: 0px;
  margin-left: 15px;
}

.chat { 
  position: absolute; 
  right: 20px; 
  bottom: 20px; 
  background: rgba(255, 83, 49, 0.8); 
width: 200px;
height: 60px;
  padding: 0; 
  border-radius: 30px; 
  cursor: pointer; 
}

.chat img{ 
  float: left;
  width: 100%;
}

/* International phone input styling */
.iti {
  width: auto;
  margin-bottom: 12px;
  position: relative;
}

.iti__flag-container {
  z-index: 2;
}

.iti__country-list {
  max-height: 210px;
  overflow-y: auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  font-size: 14px;
  z-index: 10 !important;
  position: absolute !important;
  background: white;
  border: 1px solid #ddd;
  margin-top: 40px;
}

.iti__selected-flag {
  padding: 0 8px;
}

#zc-visitor-phone {
  padding-left: 52px;
}

/* Ensure dropdown appears within modal bounds */

.iti.iti--allow-dropdown.iti--show-flags {
  width: 100%;
}

.iti--container {
  z-index: 10 !important;
  position: absolute !important;
}

.iti--fullscreen-popup.iti--container  {
  padding: 0 !important;
  background-color: rgba(255, 255, 255, 0) !important;
  overflow: hidden;
  border-radius: 2px 2px 10px 10px !important;
  left: 5px !important;
  right: 5px !important;
}

 .iti--flexible-dropdown-width .iti__country-list {
    width: 100% !important;
  }