﻿/* ===========================================
   GLOBAL BASE STYLES
=========================================== */
html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}
@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  font-family: "Poppins", Arial, sans-serif;
}
body.loading-lock {
  overflow: hidden;
  height: 100vh;
}

/* ===========================================
   BUTTONS
=========================================== */
.button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--spacing) * 2);
  border-radius: var(--radius-md);
  padding-block: calc(var(--spacing) * 2);
  padding-inline: calc(var(--spacing) * 3);
  font-weight: 600;
}
.button > i {
  font-size: var(--text-xl);
}
.button:hover {
  opacity: 0.7;
}
.button-default {
  color: var(--color-red-700);
}
.button-filled {
  background-color: var(--color-red-700);
  color: var(--color-white);
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* ===========================================
   TABLES
=========================================== */
.table tr,
.table td,
.table th {
  padding-inline: 4px;
  padding-block: 8px;
}
.table td {
  color: var(--color-gray-500);
}
.table tr:nth-child(even) {
  background: var(--color-gray-100);
}
.table tbody input[type=radio] {
  margin-top: 4px;
}

/* ===========================================
   STATE PICKER
=========================================== */
.state-picker {
  position: fixed;
  display: none;
  z-index: 100;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.18);
  min-width: 180px;
  overflow: hidden;
}
.state-picker button {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0.55rem 0.8rem;
  font-size: small;
  line-height: 1.2;
}
.state-picker button:hover {
  background: #f1f5f9;
}
.state-picker .state-dot {
  width: 12px;
  height: 12px;
  border-radius: 9999px;
  display: inline-block;
}

/* ===========================================
   SELECT2 CUSTOMIZATION
=========================================== */
.select2-container .select2-selection--single {
  border: 1px solid var(--color-gray-300);
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  background: #fff;
  height: auto;
}

.select2-results__option {
  display: flex !important;
  align-items: center;
}
.select2-results__option img {
  width: 32px;
  height: 32px;
  margin-right: 8px;
}

.select2-results__options {
  max-height: 50vh !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  margin: 6px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 26px;
  padding-left: 0;
  width: 100%;
}
.select2-container--default .select2-selection--single .select2-selection__rendered img {
  width: 24px;
  height: 24px;
  margin-right: 6px;
}

/* ===========================================
   SWIPER
=========================================== */
.swiper-button-prev,
.swiper-button-next {
  width: 36px;
  height: 36px;
  background: #fff;
  border-radius: 50%;
  color: #6c757d;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: background 0.2s, color 0.2s;
  opacity: 1;
}
.swiper-button-prev::after,
.swiper-button-next::after {
  font-size: 18px;
  color: #6c757d;
}
.swiper-button-prev:hover,
.swiper-button-next:hover {
  background: #f1f1f1;
  color: #495057;
}
.swiper-button-prev:hover::after,
.swiper-button-next:hover::after {
  color: #495057;
}

.swiper-pagination-bullet {
  height: 12px;
  width: 12px;
  margin-inline: 0.5rem;
  background: #f1f1f1;
}

/* ===========================================
   ZOOMABLE IMAGE
=========================================== */
.zoomable-image {
  transition: transform 0.3s ease;
  transform-origin: center center;
}

.zoomed {
  transform: scale(2);
  cursor: zoom-out;
}

/* ===========================================
   PAGE / BLOG CONTENT
=========================================== */
.page-content h1,
.page-content h2,
.page-content h3,
.page-content h4,
.blog-content h1,
.blog-content h2,
.blog-content h3,
.blog-content h4 {
  font-size: revert;
  font-weight: bold;
  margin-bottom: 0.5rem;
}
.page-content h1:not(:first-child),
.page-content h2:not(:first-child),
.page-content h3:not(:first-child),
.page-content h4:not(:first-child),
.blog-content h1:not(:first-child),
.blog-content h2:not(:first-child),
.blog-content h3:not(:first-child),
.blog-content h4:not(:first-child) {
  margin-top: 2rem;
}
.page-content p,
.blog-content p {
  margin-bottom: 0.5rem;
}
.page-content ul,
.blog-content ul {
  list-style: disc;
}
.page-content ol,
.blog-content ol {
  list-style: decimal;
}
.page-content ul,
.page-content ol,
.blog-content ul,
.blog-content ol {
  padding-left: 2rem;
}
.page-content ul li,
.page-content ol li,
.blog-content ul li,
.blog-content ol li {
  margin-bottom: 0.25rem;
}

/* ===========================================
   WHATSAPP FLOATING BUTTON
=========================================== */
.wa-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 58px;
  height: 58px;
  background: #25d366;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  z-index: 9;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.wa-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28);
}
.wa-fab img {
  width: 55px;
  height: 55px;
}
.wa-fab .wa-ic {
  width: 32px;
  height: 32px;
  color: white;
}

/* ===========================================
   WHATSAPP POPUP
=========================================== */
.wa-popup {
  position: fixed;
  right: 20px;
  bottom: 90px;
  width: 320px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
  z-index: 10000;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  overflow: visible;
}
.wa-popup.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.wa-popup .wa-header {
  background: #25d366;
  color: #fff;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
}
.wa-popup .wa-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}
.wa-popup .wa-glyph {
  width: 22px;
  height: 22px;
  font-size: 1.5rem;
}
.wa-popup .wa-close {
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
}
.wa-popup .wa-close:hover {
  background: rgba(0, 0, 0, 0.08);
}
.wa-popup .wa-body {
  background: #f7fff9;
  padding: 16px;
}
.wa-popup .wa-bubble {
  display: inline-block;
  background: #fff;
  color: #333;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid #eef3ef;
  position: relative;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}
.wa-popup .wa-bubble:after {
  content: "";
  position: absolute;
  left: 20px;
  bottom: -8px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-right: 1px solid #eef3ef;
  border-bottom: 1px solid #eef3ef;
  transform: rotate(45deg);
}
.wa-popup .wa-bubble.typing::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 4px;
  background: #25d366;
  vertical-align: -0.15em;
  animation: wa-caret 0.9s steps(1, end) infinite;
}
.wa-popup .wa-footer {
  padding: 14px 16px;
  background: #f7fff9;
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
}
.wa-popup .wa-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #25d366;
  color: #fff;
  border: 0;
  border-radius: 26px;
  padding: 12px 16px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(37, 211, 102, 0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}
.wa-popup .wa-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(37, 211, 102, 0.38);
}
.wa-popup .wa-btn.sending {
  animation: btn-pulse 0.64s ease;
}
.wa-popup .wa-btn.sending .plane {
  animation: fly-out 0.32s cubic-bezier(0.2, 0.7, 0.2, 1) forwards, fly-in 0.32s cubic-bezier(0.2, 0.7, 0.2, 1) 0.32s forwards;
}
.wa-popup .wa-btn .plane {
  transform-box: fill-box;
  transform-origin: 20% 50%;
  will-change: transform, opacity;
}

/* ===========================================
   RESPONSIVE
=========================================== */
@media (max-width: 420px) {
  .wa-popup {
    right: 12px;
    left: 12px;
    width: auto;
  }
  .wa-fab {
    right: 14px;
    bottom: 14px;
  }
}
/* ===========================================
   ANIMATIONS
=========================================== */
@keyframes fly-out {
  0% {
    transform: translate(0, 0) rotate(0) scale(1);
    opacity: 1;
  }
  60% {
    transform: translate(36px, -18px) rotate(8deg) scale(1.06);
    opacity: 0.96;
  }
  100% {
    transform: translate(52px, -26px) rotate(10deg) scale(1.08);
    opacity: 0.9;
  }
}
@keyframes fly-in {
  0% {
    transform: translate(52px, -26px) rotate(10deg) scale(1.08);
    opacity: 0.95;
  }
  100% {
    transform: translate(0, 0) rotate(0) scale(1);
    opacity: 1;
  }
}
@keyframes btn-pulse {
  0%, 60%, 100% {
    filter: brightness(1);
  }
  30% {
    filter: brightness(1.08);
  }
}
@keyframes wa-caret {
  50% {
    opacity: 0;
  }
}
