/* ==========================================================================
   GPM - lớp CSS dùng chung cho toàn bộ giao diện khách (client)
   Nạp trong resources/views/layouts/client_layout.blade.php, sau Tailwind CDN.
   Quy ước: màu navy + xanh dương cho giao diện; ĐỎ chỉ dùng cho Đặt lịch, giá, khuyến mãi.
   ========================================================================== */

:root {
    --gpm-navy: #0b1a3a;
    --gpm-navy-deep: #081230;
    --gpm-blue: #2563eb;
    --gpm-blue-dark: #1d4ed8;
    --gpm-sky: #7dd3fc;
    --gpm-red: #dc2626;
    --gpm-ink: #0f172a;
    --gpm-muted: #64748b;
    --gpm-line: #e2e8f0;
    --gpm-surface: #f8fafc;
    --gpm-radius: 1rem;
    --gpm-radius-sm: .75rem;
    --gpm-ease: cubic-bezier(.22, 1, .36, 1);
    --gpm-header-offset: 5.5rem;
}

/* ---------- Nền tảng ---------- */
html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--gpm-header-offset);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scrollbar-color: #94a3b8 #f1f5f9;
}

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-wrap: break-word;
}

::selection {
    background: #bfdbfe;
    color: var(--gpm-navy);
}

/* Viền focus rõ ràng cho người dùng bàn phím (ô nhập có vòng sáng riêng nên không bị ghi đè) */
:focus-visible {
    outline: 2px solid var(--gpm-blue);
    outline-offset: 2px;
}

a, button, [role="button"], summary, label[for] {
    -webkit-tap-highlight-color: transparent;
}

button, [role="button"] {
    touch-action: manipulation;
}

img, video {
    max-width: 100%;
}

/* Thanh cuộn mảnh, đồng bộ màu cho các khung cuộn */
.overflow-y-auto, .overflow-x-auto, .overflow-auto {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

/* Tôn trọng người dùng bật "giảm hiệu ứng": tắt cuộn mượt và hiệu ứng trang trí dài.
   (Các chuyển động ngắn do người dùng chủ động, như trượt ngăn đặt lịch và dải liên hệ, được giữ lại.) */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .animate-pulse, .animate-bounce, .animate-spin-slow, .animate-bounce-slow { animation: none !important; }
    .reveal { transition: none !important; }
}

@media print {
    .print\:hidden { display: none !important; }
}

/* ---------- Thành phần dùng chung ---------- */

/* Nhãn nhỏ phía trên tiêu đề mục (VD: "NĂNG LỰC THỰC TẾ") */
.gpm-eyebrow {
    font-size: .75rem;
    line-height: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .18em;
    color: var(--gpm-blue);
}

/* Ô nhập liệu: form đặt lịch, đăng nhập, tài khoản */
.gpm-input {
    height: 2.75rem;
    width: 100%;
    border-radius: var(--gpm-radius-sm);
    border: 1px solid var(--gpm-line);
    background-color: var(--gpm-surface);
    padding-left: .875rem;
    padding-right: .875rem;
    font-size: .875rem;
    color: #1e293b;
    transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.gpm-input::placeholder { color: #94a3b8; }
.gpm-input:focus {
    outline: none;
    border-color: #3b82f6;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .15);
}
.gpm-input:disabled, .gpm-input[readonly] { background-color: #f1f5f9; color: #64748b; cursor: not-allowed; }

/* Tiêu đề mục: nhãn nhỏ (.gpm-eyebrow) + tiêu đề lớn (.gpm-h2). Dùng chung cho mọi mục để cùng cỡ chữ, độ đậm, khoảng cách.
   .gpm-section-head: khối bọc (mặc định căn trái); thêm --center để căn giữa. */
.gpm-h2 {
    font-size: 1.5rem;
    line-height: 1.25;
    font-weight: 800;
    color: var(--gpm-ink);
}
@media (min-width: 768px) { .gpm-h2 { font-size: 1.875rem; } }
.gpm-h2--light { color: #fff; }

.gpm-section-head { margin-bottom: 2rem; }
@media (min-width: 768px) { .gpm-section-head { margin-bottom: 2.5rem; } }
.gpm-section-head .gpm-eyebrow { margin-bottom: .5rem; }
.gpm-section-head--center { text-align: center; margin-left: auto; margin-right: auto; max-width: 42rem; }
/* ---------- Giữ lại từ layout cũ ---------- */

/* Gạch chân menu (còn dùng ở vài nơi) */
.hover-underline-animation { display: inline-block; position: relative; }
.hover-underline-animation::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #1e40af;
    transform-origin: bottom right;
    transition: transform .25s ease-out;
}
.hover-underline-animation:hover::after { transform: scaleX(1); transform-origin: bottom left; }

/* Thanh cuộn khung chat */
#chat-content::-webkit-scrollbar { width: 6px; }
#chat-content::-webkit-scrollbar-track { background: #f1f1f1; }
#chat-content::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
#chat-content::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-in { animation: fadeIn .3s ease-out; }

@keyframes shimmer { 100% { transform: translateX(100%); } }

/* SweetAlert2: cỡ chữ nhỏ */
.small-popup-text .swal2-title { font-size: 18px !important; }
.small-popup-text .swal2-html-container { font-size: 14px !important; }
