/* Quảng cáo GOSCALE trên trang chi tiết bài viết — inc/goscale-ads.php */

.gsads { width: 100%; }
.gsads-link { display: block; line-height: 0; border-radius: 12px; overflow: hidden; } /* = bo góc ảnh đại diện bài */
.gsads-link:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 3px; }
.gsads-img, .gsads picture { display: block; width: 100%; height: auto; max-width: 100%; }

/* Banner: nằm trong cột nội dung, cách nội dung bên dưới bằng khoảng trống của khung Elementor */
.gsads-banner { margin-bottom: 24px; }
.gsads-banner .gsads-link { box-shadow: 0 2px 10px rgba(15, 23, 42, .08); }

/* Sidebar: cách form "Đăng ký dùng thử" bên dưới đúng bằng khoảng cách khối "Chuyên mục" -> form (48px) */
.gsads-sidebar { margin-bottom: 48px; }

/* Popup */
.gsads-popup[hidden] { display: none !important; }
.gsads-popup { position: fixed; inset: 0; z-index: 2147483000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.gsads-popup__backdrop { position: absolute; inset: 0; background: rgba(8, 8, 10, .72); opacity: 0; transition: opacity .25s ease; }
.gsads-popup__box { position: relative; width: min(560px, 100%); max-height: calc(100vh - 32px); opacity: 0; transform: translateY(12px) scale(.98); transition: opacity .25s ease, transform .25s ease; }
.gsads-popup__box:focus { outline: none; }
.gsads-popup.is-open .gsads-popup__backdrop { opacity: 1; }
.gsads-popup.is-open .gsads-popup__box { opacity: 1; transform: none; }
.gsads-popup .gsads-link { border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, .45); }
/* Ảnh không bao giờ cao hơn màn hình (điện thoại xoay ngang) — giữ nguyên tỉ lệ */
.gsads-popup .gsads-img { max-height: calc(100vh - 32px); width: auto; margin: 0 auto; }
.gsads-popup__close {
	position: absolute; top: -14px; right: -14px; z-index: 1; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%;
	background: #fff; color: #111; font: 400 28px/40px Arial, sans-serif; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
}
/* CSS nút chung của theme tô nền hồng + viền trắng khi :focus/:hover -> ghi đè cho riêng nút này */
.gsads-popup .gsads-popup__close:focus, .gsads-popup .gsads-popup__close:active { background: #fff !important; color: #111 !important; box-shadow: 0 4px 14px rgba(0, 0, 0, .35) !important; outline: none; }
.gsads-popup .gsads-popup__close:hover { background: #f5c518 !important; color: #111 !important; }
.gsads-popup .gsads-popup__close:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; }
@media (max-width: 600px) {
	.gsads-popup__close { top: -10px; right: -6px; width: 44px; height: 44px; line-height: 44px; }
}
html.gsads-lock, html.gsads-lock body { overflow: hidden !important; }
@media (prefers-reduced-motion: reduce) {
	.gsads-popup__backdrop, .gsads-popup__box { transition: none; }
}
