  /* ==============================================================
   Ohdidi Smart Web-to-App Gateway (TikTok / Shopee Standard)
   1. Center Interstitial Modal (Popup chính giữa màn hình)
   2. Sticky Bottom Banner (Thanh nhắc tinh tế)
   3. In-App Browser Overlay (Zalo / Facebook guide)
   ============================================================== */

/* --------------------------------------------------------------
   1. Center Interstitial Modal (Shopee / TikTok Center Dialog)
   -------------------------------------------------------------- */
.smart-center-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99998;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.25s ease;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.smart-center-modal--visible {
  display: flex;
  opacity: 1;
}

.smart-center-modal__card {
  position: relative;
  width: 100%;
  max-width: 320px;
  background: #ffffff;
  border-radius: 24px;
  padding: 28px 20px 18px;
  text-align: center;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
  transform: scale(0.92);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.smart-center-modal--visible .smart-center-modal__card {
  transform: scale(1);
}

.smart-center-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f3f4f6;
  border: none;
  font-size: 16px;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, color 0.15s;
}

.smart-center-modal__close:active {
  background: #e5e7eb;
  color: #111827;
}

.smart-center-modal__icon-wrap {
  width: 68px;
  height: 68px;
  margin: 0 auto 12px;
  border-radius: 18px;
  background: #fff;
  padding: 3px;
  box-shadow: 0 8px 22px rgba(255, 107, 53, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
}

.smart-center-modal__icon {
  width: 100%;
  height: 100%;
  border-radius: 15px;
  object-fit: cover;
}

.smart-center-modal__badge {
  display: inline-block;
  background: #fff3ed;
  color: #ff6b35;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  margin-bottom: 8px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.smart-center-modal__title {
  color: #111827;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 6px;
}

.smart-center-modal__desc {
  color: #6b7280;
  font-size: 13px;
  line-height: 1.45;
  margin: 0 0 20px;
}

.smart-center-modal__btn-primary {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
  color: #ffffff;
  border: none;
  border-radius: 24px;
  padding: 13px 0;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(255, 107, 53, 0.35);
  transition: transform 0.15s, opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.smart-center-modal__btn-primary:active {
  transform: scale(0.97);
  opacity: 0.92;
}

.smart-center-modal__btn-secondary {
  display: inline-block;
  margin-top: 14px;
  color: #9ca3af;
  font-size: 13px;
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 12px;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.smart-center-modal__btn-secondary:hover,
.smart-center-modal__btn-secondary:active {
  color: #4b5563;
  text-decoration: underline;
}

/* --------------------------------------------------------------
   2. Sticky Bottom Banner (Nhắc tinh tế sau khi đóng Modal)
   -------------------------------------------------------------- */
.smart-banner {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  padding: 10px 12px;
  align-items: center;
  gap: 10px;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.3);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.smart-banner--visible {
  display: flex;
  transform: translateY(0);
}

.smart-banner__close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}

.smart-banner__close:active {
  color: rgba(255,255,255,0.8);
}

.smart-banner__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
  object-fit: cover;
  background: #fff;
}

.smart-banner__info {
  flex: 1;
  min-width: 0;
}

.smart-banner__title {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.smart-banner__desc {
  color: rgba(255,255,255,0.65);
  font-size: 11px;
  margin-top: 2px;
  line-height: 1.3;
}

.smart-banner__rating {
  color: #f5a623;
  font-size: 10px;
  margin-top: 2px;
  letter-spacing: 1px;
}

.smart-banner__btn {
  display: inline-block;
  background: linear-gradient(135deg, #ff6b35, #f7931e);
  color: #fff;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity 0.2s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.smart-banner__btn:hover {
  opacity: 0.92;
}

.smart-banner__btn:active {
  transform: scale(0.96);
}

body.smart-banner-active {
  padding-bottom: 62px;
}

/* --------------------------------------------------------------
   3. In-App Browser Overlay (Zalo, Facebook, Messenger)
   -------------------------------------------------------------- */
.smart-inapp-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 99999;
  color: #fff;
  padding: 20px 24px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  text-align: right;
}

.smart-inapp-overlay--visible {
  display: block;
}

.smart-inapp-overlay__arrow {
  font-size: 34px;
  line-height: 1;
  animation: smartBounce 1.2s infinite;
  display: inline-block;
  margin-right: 8px;
}

.smart-inapp-overlay__content {
  margin-top: 20px;
  text-align: center;
  background: rgba(255, 255, 255, 0.12);
  padding: 22px 18px;
  border-radius: 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.smart-inapp-overlay__title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.smart-inapp-overlay__desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
}

.smart-inapp-overlay__close {
  margin-top: 18px;
  background: linear-gradient(135deg, #ff6b35, #f7931e);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 9px 26px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

@keyframes smartBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* --------------------------------------------------------------
   4. Desktop Hide: Ẩn hoàn toàn trên màn hình lớn
   -------------------------------------------------------------- */
@media (min-width: 1024px) {
  .smart-center-modal,
  .smart-banner,
  .smart-inapp-overlay {
    display: none !important;
  }
  body.smart-banner-active {
    padding-bottom: 0;
  }
}
