/* =========================================================
   Slide-in Contact Panel + Zoho Popup — Purple Theme
   - Non-breaking: keeps your existing class names
   - Uses theme variables when available
========================================================= */

/* ---------- Vars / fallbacks ---------- */
:root {
  --purple: #6a49f2;
  --dark-purple: #32236f;
  --body-text-purple: #3e3f66;
  --text-white: #fff;
  --bg-white: #fff;
  --card-radius: 16px;
  --ring: 0 0 0 3px rgba(106, 73, 242, 0.18);
  --shadow-md: 0 10px 30px rgba(50, 35, 111, 0.1);
  --shadow-lg: 0 18px 50px rgba(50, 35, 111, 0.16);
}

/* === Base Reset (kept) === */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* === Overlay Background (Blur effect) === */
.touch-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 10, 24, 0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
  z-index: 999;
}
.touch-overlay-show {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 768px) {
  .touch-overlay {
    background: rgba(16, 10, 24, 0.4);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
  }
}

/* === Contact Panel (Right Side) === */
.touch-panel {
  position: fixed;
  top: 0;
  right: -420px;
  width: 420px;
  height: 100vh;
  max-height: 100vh;
  background: #f6f4fe;
  border-left: 1px solid rgba(106, 73, 242, 0.1);
  box-shadow: -8px 0 24px rgba(50, 35, 111, 0.14);
  transition: right 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10000;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 28px 22px;
  -webkit-overflow-scrolling: touch;
  text-align: left;
}
.touch-active {
  right: 0;
}

/* === Responsive Sidebar === */
@media (max-width: 768px) {
  .touch-panel {
    width: 100%;
    right: -100%;
    padding: 20px 16px;
    border-left: 0;
    box-shadow: 0 -6px 28px rgba(50, 35, 111, 0.16);
    text-align: left;
  }
  .touch-active {
    right: 0;
  }
  
  .touch-title {
    font-size: 20px;
    margin: 8px 0 12px 0;
    text-align: left;
  }
  
  .touch-description {
    text-align: left;
  }
  
  .touch-input,
  .touch-textarea {
    padding: 10px 12px;
    font-size: 14px;
    text-align: left;
  }
  
  .touch-btn {
    padding: 11px 16px;
    font-size: 15px;
  }
  
  .touch-icon {
    width: 36px;
    height: 36px;
    font-size: 15px;
  }
  
  .touch-item {
    gap: 10px;
    padding: 6px 0;
    text-align: left;
  }
  
  .touch-text {
    text-align: left;
  }
  
  .touch-social {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  
  .touch-social-link {
    width: 34px;
    height: 34px;
    font-size: 15px;
    flex-shrink: 0;
  }
}

@media (max-width: 480px) {
  .touch-panel {
    padding: 18px 14px;
    text-align: left;
  }
  
  .touch-title {
    font-size: 18px;
    margin: 6px 0 10px 0;
    text-align: left;
  }
  
  .touch-close-btn {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }
  
  .touch-description {
    font-size: 13px;
    line-height: 1.6;
    text-align: left;
  }
  
  .touch-icon {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
  
  .touch-link {
    font-size: 14px;
  }
  
  .touch-subtext {
    font-size: 11px;
  }
  
  .touch-item {
    text-align: left;
  }
  
  .touch-text {
    text-align: left;
  }
  
  .touch-social {
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  
  .touch-social-link {
    width: 32px;
    height: 32px;
    font-size: 14px;
    flex-shrink: 0;
  }
}

/* === Close Button === */
.touch-close-btn {
  position: sticky;
  top: 6px;
  margin-left: auto;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  /* background: rgba(106, 73, 242, 0.1); */
  border: none;
  color: var(--purple);
  font-size: 18px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.touch-close-btn:hover {
  background: rgba(106, 73, 242, 0.18);
  transform: translateY(-1px);
}
.touch-close-btn:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

/* === Section Titles === */
.touch-title {
  color: var(--dark-purple);
  font-size: 22px;
  font-weight: 700;
  margin: 10px 0 14px 0;
  text-align: left;
}

/* === Quote Form === */
.touch-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.touch-input,
.touch-textarea {
  width: 100%;
  border: 1px solid #e6e2f6;
  background: #fff;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.touch-textarea {
  min-height: 120px;
  resize: vertical;
}

.touch-input:focus,
.touch-textarea:focus {
  border-color: var(--purple);
  box-shadow: var(--ring);
  outline: none;
}

.touch-btn {
  background: linear-gradient(90deg, var(--purple), #8a6df9);
  border: none;
  color: #fff;
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(106, 73, 242, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.touch-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(106, 73, 242, 0.36);
}
.touch-btn:active {
  transform: translateY(0);
  opacity: 0.92;
}
.touch-btn:focus-visible {
  outline: none;
  box-shadow: var(--ring), 0 12px 28px rgba(106, 73, 242, 0.28);
}

/* === Divider Line === */
.touch-divider {
  margin: 20px 0;
  border: none;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(106, 73, 242, 0.18),
    rgba(106, 73, 242, 0.04)
  );
}

/* === Contact Section === */
.touch-description {
  color: var(--body-text-purple);
  font-size: 14px;
  line-height: 1.65;
  margin-bottom: 12px;
  text-align: left;
}

.touch-contact-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.touch-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 4px;
  border-radius: 12px;
  transition: background-color 0.2s ease;
  text-align: left;
}

.touch-item:hover {
  background-color: rgba(106, 73, 242, 0.05);
}

.touch-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(106, 73, 242, 0.15), rgba(138, 109, 249, 0.1));
  color: var(--purple);
  font-size: 17px;
  margin-top: 0;
  flex-shrink: 0;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(106, 73, 242, 0.1);
}

.touch-icon:hover {
  background: linear-gradient(135deg, var(--purple), #8a6df9);
  color: #fff;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 12px rgba(106, 73, 242, 0.25);
}

.touch-text {
  text-align: left;
  flex: 1;
}

.touch-text p {
  text-align: left;
  margin: 0;
}

.touch-link {
  color: var(--dark-purple);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s ease;
  text-align: left;
}
.touch-link:hover {
  color: var(--purple);
}

.touch-subtext {
  font-size: 12px;
  color: #7b7b93;
}
.touch-address {
  color: var(--dark-purple);
  font-size: 14px;
  line-height: 1.5;
}

/* === Social Icons === */
.touch-social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  justify-content: flex-start;
}
.touch-social-link {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(106, 73, 242, 0.15), rgba(138, 109, 249, 0.1));
  color: var(--dark-purple);
  font-size: 17px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(106, 73, 242, 0.1);
  flex-shrink: 0;
}
.touch-social-link:hover {
  background: linear-gradient(135deg, var(--purple), #8a6df9);
  color: #fff;
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 4px 12px rgba(106, 73, 242, 0.3);
}

/* === Scrollbar Styling (panel only) === */
.touch-panel::-webkit-scrollbar {
  width: 8px;
}
.touch-panel::-webkit-scrollbar-thumb {
  background: #e6e2f6;
  border-radius: 10px;
}
.touch-panel::-webkit-scrollbar-thumb:hover {
  background: #d7d1f3;
}

/* === Reduced motion respect === */
@media (prefers-reduced-motion: reduce) {
  .touch-overlay,
  .touch-panel,
  .touch-btn,
  .touch-close-btn,
  .touch-social-link {
    transition: none !important;
  }
}

/* =========================================================
   Zoho Popup — themed
========================================================= */
.zoho-popup {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  justify-content: center;
  align-items: center;
}
.popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(12, 10, 24, 0.45);
  backdrop-filter: blur(3px);
}

.zoho-popup-content {
  background: #fff;
  padding: 26px 22px;
  border-radius: 16px;
  text-align: center;
  width: 90%;
  max-width: 520px;
  position: relative;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(106, 73, 242, 0.1);
  animation: zohoFadeIn 0.35s ease;
}

.zoho-close {
  position: absolute;
  right: 12px;
  top: 10px;
  font-size: 22px;
  cursor: pointer;
  color: var(--dark-purple);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  transition: background 0.15s ease, transform 0.15s ease;
}
.zoho-close:hover {
  background: rgba(106, 73, 242, 0.1);
  transform: translateY(-1px);
}
.zoho-close:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.zoho-popup-header h3 {
  color: var(--dark-purple);
  margin-bottom: 6px;
  font-weight: 700;
}
.offer {
  background: #f6f4fe;
  color: #000;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(106, 73, 242, 0.12);
}

.zoho-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}
.zoho-form input {
  padding: 12px 14px;
  border: 1px solid #e6e2f6;
  border-radius: 12px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.zoho-form input:focus {
  border-color: var(--purple);
  box-shadow: var(--ring);
  outline: none;
}

.zoho-btn {
  background: linear-gradient(90deg, var(--purple), #8a6df9);
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(106, 73, 242, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.zoho-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(106, 73, 242, 0.36);
}
.zoho-btn:active {
  opacity: 0.94;
}
.zoho-btn:focus-visible {
  outline: none;
  box-shadow: var(--ring), 0 12px 28px rgba(106, 73, 242, 0.28);
}

/* Animations */
@keyframes zohoFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Optional: dark-mode polish if you toggle body.dark-version */
body.dark-version .touch-panel,
body.dark-version .zoho-popup-content {
  background: #0f1224;
  color: #e8e7ff;
  border-color: rgba(138, 109, 249, 0.18);
}
body.dark-version .touch-input,
body.dark-version .touch-textarea,
body.dark-version .zoho-form input {
  background: #151830;
  color: #e8e7ff;
  border-color: #2a2f57;
}
body.dark-version .touch-divider {
  background: linear-gradient(
    90deg,
    rgba(138, 109, 249, 0.28),
    rgba(138, 109, 249, 0.06)
  );
}
