/* assets/css/app-clip.css - Giao diện Apple App Clip Smart Banner & Modal Card */

/* =========================================
   1. SMART APP CLIP BANNER
   ========================================= */
.app-clip-banner {
  background: rgba(14, 18, 28, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 0;
  position: relative;
  z-index: 1001;
  transition: all 0.3s ease;
}

.app-clip-banner.hidden {
  display: none;
}

.app-clip-banner-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.app-clip-banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-clip-banner-close {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: transparent;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.app-clip-banner-close:hover {
  color: #fff;
}

/* Icon App Clip với vòng tròn hào quang đặc trưng */
.app-clip-icon-wrapper {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.app-clip-halo {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px dashed var(--secondary);
  animation: rotateClipHalo 10s linear infinite;
}

@keyframes rotateClipHalo {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.app-clip-icon {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.95rem;
  box-shadow: 0 0 12px var(--primary-glow);
}

.app-clip-text {
  display: flex;
  flex-direction: column;
}

.app-clip-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-clip-title strong {
  font-size: 0.92rem;
  color: #fff;
}

.app-clip-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e2e8f0;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

.app-clip-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.app-clip-btn-open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  color: #000000;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.app-clip-btn-open:hover {
  background: #f1f5f9;
  box-shadow: 0 4px 18px rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

/* =========================================
   2. APP CLIP MODAL CARD (PHONG CÁCH APPLE)
   ========================================= */
.app-clip-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10005;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.app-clip-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.app-clip-modal-card {
  width: 100%;
  max-width: 440px;
  background: rgba(18, 22, 34, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 28px 28px 0 0;
  padding: 16px 24px calc(24px + env(safe-area-inset-bottom, 0px)) 24px;
  box-shadow: 0 -15px 50px rgba(0, 0, 0, 0.85);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  position: relative;
  box-sizing: border-box;
}

.app-clip-modal-overlay.active .app-clip-modal-card {
  transform: translateY(0);
}

/* Trên máy tính (PC): Hiển thị modal card lơ lửng chính giữa */
@media (min-width: 769px) {
  .app-clip-modal-overlay {
    align-items: center;
  }
  .app-clip-modal-card {
    border-radius: 28px;
    transform: scale(0.9);
  }
  .app-clip-modal-overlay.active .app-clip-modal-card {
    transform: scale(1);
  }
}

.app-clip-card-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.app-clip-card-close:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.app-clip-card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 10px;
}

/* Biểu tượng App Clip Code mô phỏng Apple */
.app-clip-code-container {
  position: relative;
  width: 110px;
  height: 110px;
  margin: 10px 0 18px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-clip-code-ring {
  position: absolute;
  border-radius: 50%;
}

.app-clip-code-ring.outer-ring {
  inset: 0;
  border: 3px dashed var(--secondary);
  animation: rotateClipHalo 16s linear infinite;
  box-shadow: 0 0 20px var(--secondary-glow);
}

.app-clip-code-ring.inner-ring {
  inset: 10px;
  border: 2px dashed var(--primary);
  animation: rotateClipHalo 10s linear infinite reverse;
}

.app-clip-code-center {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e1e2d, #0f131f);
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

.apple-center-logo {
  font-size: 1.5rem;
  color: #ffffff;
}

.center-app-title {
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.app-clip-heading {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.app-clip-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 18px;
}

/* 3 Tính năng nổi bật */
.app-clip-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  margin-bottom: 20px;
}

.app-clip-feat-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-main);
}

.app-clip-feat-item i {
  font-size: 1.1rem;
}

.text-cyan { color: var(--secondary); }
.text-purple { color: var(--primary); }
.text-emerald { color: #10b981; }

/* Nút hành động */
.app-clip-action-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.app-clip-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: var(--radius-full);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.app-clip-action-btn.primary {
  background: #ffffff;
  color: #000000;
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.25);
}

.app-clip-action-btn.primary:hover {
  background: #f1f5f9;
  box-shadow: 0 6px 25px rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

.app-clip-action-btn.secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: #fff;
}

.app-clip-action-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
}

/* Hướng dẫn cài đặt Safari iOS */
.ios-install-steps {
  margin-top: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  animation: fadeInDown 0.3s ease;
}

.step-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.step-row strong {
  color: #fff;
}

@media (max-width: 480px) {
  .app-clip-subtitle {
    display: none;
  }
}
