/* WhatsApp Chat App Theme */
@import url('https://fonts.googleapis.com/css2?family=Segoe+UI:wght@400;600;700&family=Helvetica+Neue:wght@400;500&display=swap');

:root {
  --wa-green: #075e54;
  --wa-light-green: #128C7E;
  --wa-bg: #ece5dd;
  --wa-bubble-in: #ffffff;
  --wa-bubble-out: #dcf8c6;
  --wa-text: #303030;
  --wa-time: #999999;
  --wa-blue-tick: #34B7F1;
  --wa-header-text: #ffffff;
  --font-wa: 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

body {
  margin: 0; padding: 0;
  background-color: var(--wa-bg);
  /* Fallback subtle pattern */
  background-image: url('data:image/svg+xml,%3Csvg width="20" height="20" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M0 0h20v20H0z" fill="%23ece5dd"/%3E%3Cpath d="M2 2h2v2H2z" fill="%23000000" fill-opacity="0.05"/%3E%3C/svg%3E');
  color: var(--wa-text);
  font-family: var(--font-wa);
  overflow-x: hidden;
  font-size: 15px;
  line-height: 1.4;
}

.wa-container {
  max-width: 600px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  background: transparent;
  display: flex;
  flex-direction: column;
}

/* Header */
.wa-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 60px;
  background-color: var(--wa-green);
  color: var(--wa-header-text);
  display: flex;
  align-items: center;
  padding: 0 15px;
  z-index: 1000;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
@media(min-width: 600px) {
    .wa-header {
        max-width: 600px;
        margin: 0 auto;
        left: 50%;
        transform: translateX(-50%);
    }
}
.wa-header-back {
  font-size: 24px;
  margin-right: 5px;
  display: flex; align-items: center; cursor: pointer;
}
.wa-header-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 12px;
  background: #ccc;
}
.wa-header-info {
  flex: 1;
}
.wa-header-name {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wa-header-status {
  font-size: 12px;
  opacity: 0.8;
  margin: 0;
}
.wa-header-actions i {
  font-size: 22px;
  margin-left: 18px;
  cursor: pointer;
}

/* Chat Area */
.wa-chat-area {
  flex: 1;
  padding: 80px 10px 80px 10px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Date Bubble */
.wa-date-bubble {
  align-self: center;
  background-color: #e1f3fb;
  color: #4a5c66;
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 12px;
  box-shadow: 0 1px 1px rgba(0,0,0,0.05);
  margin: 10px 0;
  text-transform: uppercase;
}

/* Chat Bubbles */
.wa-bubble {
  max-width: 85%;
  position: relative;
  padding: 8px 12px;
  border-radius: 8px;
  box-shadow: 0 1px 1px rgba(0,0,0,0.1);
  word-wrap: break-word;
}
.wa-bubble-in {
  align-self: flex-start;
  background-color: var(--wa-bubble-in);
  border-top-left-radius: 0;
}
.wa-bubble-out {
  align-self: flex-end;
  background-color: var(--wa-bubble-out);
  border-top-right-radius: 0;
}

/* Typography inside bubbles */
.wa-bubble h3 {
  margin: 0 0 5px 0;
  font-size: 16px;
  color: var(--wa-green);
}
.wa-bubble p {
  margin: 0;
  font-size: 14px;
}
.wa-bubble a {
  color: #039be5;
  text-decoration: none;
}
.wa-bubble img {
  max-width: 100%;
  border-radius: 6px;
  margin-top: 5px;
  display: block;
}
.wa-bubble-image {
  padding: 4px; /* Less padding for image bubbles */
  width: 280px; /* Force width for slider */
}
.wa-bubble-image img {
  margin-top: 0;
}

/* Meta Data (Time & Ticks) */
.wa-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 4px;
  font-size: 11px;
  color: var(--wa-time);
}
.wa-meta-img {
  position: absolute;
  bottom: 8px; right: 8px;
  background: rgba(0,0,0,0.4);
  color: #fff;
  padding: 2px 6px;
  border-radius: 10px;
}
.wa-tick {
  color: var(--wa-blue-tick);
  font-size: 16px;
  line-height: 1;
}

/* Button inside chat and everywhere */
a.wa-btn, button.wa-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background-color: var(--wa-light-green);
  color: #fff !important;
  padding: 8px 15px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  margin-top: 10px;
  border: none;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
}
a.wa-btn:hover, button.wa-btn:hover {
  background-color: var(--wa-green);
}

/* Cover Overlay */
.wa-cover {
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.8);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s;
}
.wa-cover.opened {
  opacity: 0;
  pointer-events: none;
}
.wa-notification {
  background: #fff;
  width: 85%;
  max-width: 350px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}
.wa-notif-header {
  background: #f0f0f0;
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.wa-notif-icon {
  width: 40px; height: 40px;
  background: var(--wa-light-green);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 24px;
}
.wa-notif-content {
  padding: 20px;
  text-align: center;
}
.wa-notif-content img {
  width: 100px; height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 15px;
}

/* Form Styles */
.wa-form input, .wa-form select, .wa-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-bottom: 10px;
  font-family: inherit;
  box-sizing: border-box;
}

/* Typing Indicator */
.typing {
  align-self: flex-start;
  background-color: var(--wa-bubble-in);
  padding: 12px 16px;
  border-radius: 20px;
  display: flex;
  gap: 4px;
  box-shadow: 0 1px 1px rgba(0,0,0,0.1);
  margin-bottom: 15px;
}
.dot {
  width: 6px; height: 6px;
  background-color: #999;
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out both;
}
.dot:nth-child(1) { animation-delay: -0.32s; }
.dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* Music Input Bar at bottom */
.wa-input-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background-color: #f0f0f0;
  display: flex;
  align-items: center;
  padding: 0 10px;
  z-index: 1000;
}
@media(min-width: 600px) {
    .wa-input-bar {
        max-width: 600px;
        margin: 0 auto;
        left: 50%;
        transform: translateX(-50%);
    }
}
.wa-input-box {
  flex: 1;
  background: #fff;
  border-radius: 30px;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  color: #999;
}
.wa-mic-btn {
  width: 40px; height: 40px;
  background: var(--wa-light-green);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-left: 10px;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.countdown-wrapper { display:flex; gap:10px; justify-content:center; margin-top:10px; margin-bottom:10px; }
.cd-item { background:var(--wa-light-green); color:#fff; padding:10px; border-radius:8px; min-width:50px; text-align:center; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }

.slider-container { position:relative; width:100%; height:300px; overflow:hidden; border-radius:6px; }
.slide { position:absolute; inset:0; opacity:0; transition:opacity 1s ease; }
.slide.active { opacity:1; z-index:2; }
.slide img { width:100%; height:100%; object-fit:cover; }
