/* KiranaShopy First Visit Popup */

#ks-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: ks-fadeIn 0.35s ease;
}

@keyframes ks-fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

#ks-popup-box {
  background: #fff;
  border-radius: 16px;
  padding: 2.4rem 2.2rem 2rem;
  width: 100%;
  max-width: 430px;
  margin: 1rem;
  box-shadow: 0 24px 60px rgba(0,0,0,0.28);
  animation: ks-slideUp 0.38s cubic-bezier(.22,.9,.36,1);
  position: relative;
  overflow: hidden;
}

#ks-popup-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, #ff6200, #ff9500);
  border-radius: 16px 16px 0 0;
}

@keyframes ks-slideUp {
  from { opacity: 0; transform: translateY(32px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

#ks-popup-logo {
  text-align: center;
  margin-bottom: 0.4rem;
}

#ks-popup-logo img {
  height: 56px;
  object-fit: contain;
}

#ks-popup-box h2 {
  text-align: center;
  font-family: sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: #ff6200;
  margin: 0 0 0.25rem;
}

#ks-popup-box p.ks-sub {
  text-align: center;
  font-family: sans-serif;
  font-size: 0.82rem;
  color: #777;
  margin: 0 0 1.4rem;
}

.ks-field {
  margin-bottom: 1rem;
}

.ks-field label {
  display: block;
  font-family: sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 0.3rem;
  letter-spacing: 0.02em;
}

.ks-field label .ks-optional {
  font-weight: 400;
  color: #aaa;
  font-size: 0.75rem;
}

.ks-field label .ks-required {
  color: #ff6200;
  margin-left: 2px;
}

.ks-field input {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.8px solid #e0e0e0;
  border-radius: 8px;
  font-family: sans-serif;
  font-size: 0.9rem;
  color: #222;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
  background: #fafafa;
}

.ks-field input:focus {
  border-color: #ff6200;
  background: #fff;
}

.ks-field input.ks-error {
  border-color: #e53e3e;
  background: #fff5f5;
}

.ks-err-msg {
  display: none;
  font-family: sans-serif;
  font-size: 0.74rem;
  color: #e53e3e;
  margin-top: 0.28rem;
}

.ks-err-msg.visible {
  display: block;
}

#ks-status-msg {
  font-family: sans-serif;
  font-size: 0.85rem;
  padding: 0.7rem 0.9rem;
  margin: 0.8rem 0 0.6rem 0;
  border-radius: 6px;
  text-align: center;
  min-height: 1.2rem;
  display: none;
}

.ks-status-loading {
  background: #e3f2fd;
  color: #1976d2;
  border: 1px solid #90caf9;
  display: block;
}

.ks-status-success {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #81c784;
  display: block;
}

.ks-status-error {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ef5350;
  display: block;
}

#ks-submit-btn {
  width: 100%;
  padding: 0.78rem;
  background: linear-gradient(135deg, #ff6200, #ff9500);
  color: #fff;
  border: none;
  border-radius: 9px;
  font-family: sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 0.5rem;
  letter-spacing: 0.03em;
  transition: opacity 0.2s, transform 0.15s;
  box-shadow: 0 4px 16px rgba(255,98,0,0.28);
}

#ks-submit-btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

#ks-submit-btn:active {
  transform: scale(0.98);
}

.ks-privacy {
  text-align: center;
  font-family: sans-serif;
  font-size: 0.72rem;
  color: #aaa;
  margin-top: 0.9rem;
}

@media (max-width: 480px) {
  #ks-popup-box {
    padding: 2rem 1.3rem 1.6rem;
    border-radius: 12px;
    margin: 0.5rem;
  }
}
