/* Home page notices (resources/views/themes/shinhan/inc/home-popup.blade.php, js/home-popup.js). */
.shbp-overlay {
  --shbp-navy: #163778;
  --shbp-blue: #0046ff;
  --shbp-text: #1f2a44;
  --shbp-muted: #5b6478;
  --shbp-line: #e6e9f0;
  position: fixed; inset: 0; z-index: 10050;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  background: rgba(11, 22, 48, .55);
  opacity: 0; transition: opacity .2s ease;
  font-family: inherit;
}
.shbp-overlay[hidden] { display: none; }
.shbp-overlay.is-open { opacity: 1; }
html.shbp-lock, html.shbp-lock body { overflow: hidden; }

.shbp-card {
  position: relative;
  width: 100%; max-width: 520px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
  display: flex; flex-direction: column;
  background: #fff; color: var(--shbp-text);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(11, 22, 48, .28), 0 2px 8px rgba(11, 22, 48, .12);
  overflow: hidden;
  transform: translateY(12px) scale(.98); opacity: 0;
  transition: transform .22s ease, opacity .22s ease;
  outline: none;
}
.shbp-card[hidden] { display: none; }
.shbp-card.is-in { transform: none; opacity: 1; }

.shbp-close {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .92); color: var(--shbp-navy);
  box-shadow: 0 1px 4px rgba(11, 22, 48, .2);
  cursor: pointer;
}
.shbp-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.shbp-close:hover { background: #fff; color: var(--shbp-blue); }
.shbp-close:focus-visible, .shbp-btn:focus-visible, .shbp-media a:focus-visible, .shbp-skip:focus-visible {
  outline: 3px solid rgba(0, 70, 255, .45); outline-offset: 2px;
}

.shbp-flag {
  padding: 8px 56px 8px 16px;
  background: #fff4d6; color: #7a4b00; border-bottom: 1px solid #f1d58a;
  font-size: 12px; font-weight: 700; letter-spacing: .04em;
}

.shbp-media { flex: none; background: #f2f4f8; }
.shbp-media img { display: block; width: 100%; height: auto; max-height: 52vh; object-fit: cover; }
.shbp--image .shbp-media img { max-height: none; }

.shbp-body { padding: 22px 24px 20px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.shbp-head { display: flex; align-items: flex-start; gap: 12px; padding-right: 32px; }
.shbp--image_text .shbp-head, .shbp--image .shbp-head { padding-right: 0; }
.shbp-title { margin: 0; font-size: 19px; line-height: 1.35; font-weight: 700; color: var(--shbp-navy); text-transform: none; }
/* "Chỉ hình": the title names the dialog for screen readers only */
.shbp--image .shbp-head { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.shbp--image .shbp-body { padding: 0; }
.shbp--image .shbp-actions { padding: 14px 16px; margin: 0; }

.shbp-icon {
  flex: none; width: 40px; height: 40px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #e8efff; color: var(--shbp-blue);
}
.shbp-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.shbp-icon--promotion { background: #fff0e6; color: #e2620b; }
.shbp-icon--warning { background: #fdecec; color: #c62828; }
.shbp-icon--event { background: #ecf7ee; color: #1e8a3a; }
.shbp-icon--security { background: #eaf6f6; color: #0d7f7f; }
.shbp-icon--announcement { background: #f1ecff; color: #5b3cc4; }

.shbp-content { margin-top: 12px; font-size: 15px; line-height: 1.6; color: var(--shbp-text); }
.shbp-content > :first-child { margin-top: 0; }
.shbp-content > :last-child { margin-bottom: 0; }
.shbp-content p { margin: 0 0 10px; }
.shbp-content a { color: var(--shbp-blue); text-decoration: underline; }
.shbp-content img { max-width: 100%; height: auto; }

.shbp-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.shbp-btn {
  flex: 1 1 auto; min-width: 140px; min-height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 20px; border-radius: 10px;
  font-size: 15px; font-weight: 700; line-height: 1.2; text-align: center; text-decoration: none !important;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.shbp-btn--primary { background: var(--shbp-blue); color: #fff !important; border: 2px solid var(--shbp-blue); }
.shbp-btn--primary:hover { background: #0036c7; border-color: #0036c7; }
.shbp-btn--secondary { background: #fff; color: var(--shbp-blue) !important; border: 2px solid #c9d6ff; }
.shbp-btn--secondary:hover { border-color: var(--shbp-blue); }

.shbp-foot {
  flex: none; display: flex; align-items: center; gap: 10px;
  margin: 0; padding: 12px 24px;
  border-top: 1px solid var(--shbp-line); background: #f8f9fc;
  font-size: 14px; font-weight: 400; color: var(--shbp-muted); cursor: pointer;
}
.shbp-skip { width: 18px; height: 18px; margin: 0 !important; accent-color: var(--shbp-blue); cursor: pointer; }

@media (max-width: 575px) {
  .shbp-overlay { align-items: flex-end; padding: 12px; }
  .shbp-card { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); border-radius: 16px; }
  .shbp-body { padding: 18px 18px 16px; }
  .shbp-title { font-size: 17px; }
  .shbp-foot { padding: 12px 18px; }
  .shbp-btn { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .shbp-overlay, .shbp-card { transition: none; }
}
