/* ============================================================
   Phone Mockup Carousel - Hero Section
   Tất cả selector được scope dưới .hero-phone-carousel để
   tránh xung đột với CSS hiện có của landing page.
   ============================================================ */

.hero-phone-carousel {
    --phone-scale: 0.6;
    --phone-w: 375px;
    --phone-h: 812px;
    position: relative;
    width: calc(var(--phone-w) * var(--phone-scale) + 36px);
    height: calc(var(--phone-h) * var(--phone-scale) + 36px);
    overflow: hidden;
    border-radius: 32px;
    margin: 0 auto;
}

.hero-phone-track {
    display: flex;
    height: 100%;
    width: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.hero-phone-slide {
    flex: 0 0 100%;
    position: relative;
    height: 100%;
}

.hero-phone-carousel .phone {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(var(--phone-scale));
    transform-origin: center center;
    font-family: -apple-system, 'SF Pro Text', 'Roboto', 'Segoe UI', sans-serif;
}

/* Dots indicator */
.hero-phone-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
}

.hero-phone-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(42, 89, 165, 0.25);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-phone-dot.active {
    background: var(--primary, #2a59a5);
    width: 24px;
    border-radius: 4px;
}

.hero-phone-dot:hover {
    background: var(--primary, #2a59a5);
    opacity: 0.7;
}

/* ============================================================
   Phone mockup internal styles (copy từ onecare-screens.html
   được scope với .hero-phone-carousel)
   ============================================================ */

.hero-phone-carousel .phone {
    width: 375px;
    height: 812px;
    background: #f5f5f5;
    border-radius: 48px;
    box-shadow:
        0 0 0 9px #1c1c1e,
        0 0 0 11px #3a3a3c,
        0 28px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    box-sizing: border-box;
}

.hero-phone-carousel .phone * {
    box-sizing: border-box;
}

/* Status bar */
.hero-phone-carousel .sb {
    height: 28px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    flex-shrink: 0;
}
.hero-phone-carousel .sb .t { font-size: 13px; font-weight: 600; color: #111; }
.hero-phone-carousel .sb .ic { font-size: 11px; color: #111; display: flex; gap: 4px; }

/* Home indicator */
.hero-phone-carousel .hi {
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.hero-phone-carousel .hi div {
    width: 120px;
    height: 5px;
    background: #000;
    border-radius: 3px;
    opacity: 0.15;
}
.hero-phone-carousel .hi.gray  { background: #f5f5f5; }
.hero-phone-carousel .hi.white { background: #fff; }

/* Top bar */
.hero-phone-carousel .topbar {
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    padding: 10px 16px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.hero-phone-carousel .topbar-left { display: flex; align-items: center; gap: 8px; }
.hero-phone-carousel .topbar-title { font-size: 17px; font-weight: 700; color: #111; }
.hero-phone-carousel .back { font-size: 22px; color: #2563eb; background: none; border: none; padding: 0 6px 0 0; cursor: pointer; line-height: 1; }
.hero-phone-carousel .refresh-ic { font-size: 19px; color: #555; }
.hero-phone-carousel .search-ic  { font-size: 19px; color: #555; margin-right: 2px; }

/* Tabs */
.hero-phone-carousel .tabs-bar {
    background: #fff;
    display: flex;
    border-bottom: 1.5px solid #f0f0f0;
    flex-shrink: 0;
}
.hero-phone-carousel .tab {
    flex: 1;
    padding: 11px 8px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    color: #888;
    border-bottom: 2px solid transparent;
    position: relative;
    bottom: -1.5px;
}
.hero-phone-carousel .tab.active { color: #2563eb; border-bottom-color: #2563eb; font-weight: 700; }
.hero-phone-carousel .tab-badge {
    background: #2563eb;
    color: #fff;
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 11px;
}

.hero-phone-carousel .scroll { flex: 1; overflow-y: auto; }
.hero-phone-carousel .scroll::-webkit-scrollbar { display: none; }

/* Doc card */
.hero-phone-carousel .dcard {
    background: #fff;
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.07);
    margin-bottom: 10px;
    position: relative;
}
.hero-phone-carousel .dcard-dot { position: absolute; top: 14px; right: 14px; width: 8px; height: 8px; background: #ef4444; border-radius: 50%; }
.hero-phone-carousel .dcard-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
.hero-phone-carousel .dcard-code { font-size: 15px; font-weight: 700; color: #111; }
.hero-phone-carousel .dcard-type { font-size: 12px; color: #888; margin-top: 2px; }
.hero-phone-carousel .dbadge { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 20px; flex-shrink: 0; margin-left: 8px; margin-top: 2px; }
.hero-phone-carousel .dbadge.wait   { background: #fef9c3; color: #a16207; }
.hero-phone-carousel .dbadge.done   { background: #dcfce7; color: #16a34a; }
.hero-phone-carousel .dbadge.cancel { background: #f3f4f6; color: #6b7280; }
.hero-phone-carousel .dcard-div { border: none; border-top: 1px dashed #f0f0f0; margin: 10px 0; }
.hero-phone-carousel .dcard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.hero-phone-carousel .df .dl { font-size: 11px; color: #aaa; margin-bottom: 2px; }
.hero-phone-carousel .df .dv { font-size: 12px; font-weight: 600; color: #333; }

/* FAB */
.hero-phone-carousel .fab {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px 20px;
    background: linear-gradient(to top, #f5f5f5 60%, transparent);
}
.hero-phone-carousel .fab-btn {
    width: 100%;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

/* PDF preview */
.hero-phone-carousel .pdf-wrap {
    background: #e8edf3;
    margin: 14px 16px 0;
    border-radius: 14px;
    overflow: hidden;
    flex-shrink: 0;
}
.hero-phone-carousel .pdf-inner {
    background: #fff;
    margin: 10px;
    border-radius: 8px;
    padding: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}
.hero-phone-carousel .pdf-hdr { display: flex; justify-content: space-between; font-size: 9px; color: #666; margin-bottom: 8px; }
.hero-phone-carousel .pdf-ttl { text-align: center; font-size: 10px; font-weight: 700; color: #111; text-transform: uppercase; line-height: 1.4; margin-bottom: 8px; }
.hero-phone-carousel .pline { height: 6px; background: #f0f0f0; border-radius: 3px; margin-bottom: 5px; }
.hero-phone-carousel .pline.med { width: 80%; }
.hero-phone-carousel .pline.sht { width: 55%; }
.hero-phone-carousel .pdf-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}
.hero-phone-carousel .puc {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 10px 14px;
    color: #fff;
}
.hero-phone-carousel .puc-code { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.hero-phone-carousel .puc-line { font-size: 10px; opacity: 0.8; margin-bottom: 2px; }
.hero-phone-carousel .view-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 11px;
    cursor: pointer;
    margin-top: 8px;
    display: inline-block;
}

/* Info section */
.hero-phone-carousel .info-sec {
    background: #fff;
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.07);
    margin-bottom: 12px;
}
.hero-phone-carousel .info-sec-hd { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.hero-phone-carousel .info-sec-title { font-size: 14px; font-weight: 700; color: #111; }
.hero-phone-carousel .badge-wait { background: #fef9c3; color: #a16207; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 20px; }
.hero-phone-carousel .info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hero-phone-carousel .ig-f .ig-l { font-size: 11px; color: #aaa; margin-bottom: 3px; }
.hero-phone-carousel .ig-f .ig-v { font-size: 13px; font-weight: 600; color: #222; }

/* Action bar */
.hero-phone-carousel .action-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px 20px;
    background: linear-gradient(to top, #fff 80%, transparent);
    display: flex;
    gap: 10px;
}
.hero-phone-carousel .btn-reject  { flex: 1; background: #fff; color: #ef4444; border: 1.5px solid #ef4444; border-radius: 12px; padding: 14px; font-size: 15px; font-weight: 700; cursor: pointer; }
.hero-phone-carousel .btn-confirm { flex: 2; background: #2563eb; color: #fff; border: none; border-radius: 12px; padding: 14px; font-size: 15px; font-weight: 700; cursor: pointer; box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3); }

/* Progress block */
.hero-phone-carousel .prog-block { background: #eff6ff; border-radius: 14px; padding: 16px; margin-bottom: 14px; }
.hero-phone-carousel .prog-title { font-size: 14px; font-weight: 700; color: #111; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.hero-phone-carousel .prog-bar-wrap { background: #dbeafe; border-radius: 4px; height: 6px; margin-bottom: 8px; overflow: hidden; }
.hero-phone-carousel .prog-fill { height: 100%; background: #2563eb; border-radius: 4px; }
.hero-phone-carousel .prog-step { font-size: 12px; color: #2563eb; font-weight: 500; }
.hero-phone-carousel .prog-sse  { font-size: 12px; color: #16a34a; font-weight: 500; margin-top: 4px; }
.hero-phone-carousel .warn-box { background: #fff3cd; border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: #856404; line-height: 1.5; }
.hero-phone-carousel .timer-row { display: flex; justify-content: space-between; font-size: 12px; color: #555; margin-bottom: 8px; }
.hero-phone-carousel .timer-val { font-weight: 600; color: #111; }
.hero-phone-carousel .btn-cancel-sign { width: 100%; background: #fee2e2; color: #dc2626; border: none; border-radius: 12px; padding: 14px; font-size: 15px; font-weight: 700; cursor: pointer; }

/* Success */
.hero-phone-carousel .success-wrap { flex: 1; overflow-y: auto; padding: 0 16px; display: flex; flex-direction: column; align-items: center; }
.hero-phone-carousel .success-wrap::-webkit-scrollbar { display: none; }
.hero-phone-carousel .success-circle { width: 80px; height: 80px; border-radius: 50%; background: #dcfce7; display: flex; align-items: center; justify-content: center; font-size: 40px; margin: 28px 0 12px; }
.hero-phone-carousel .success-title { font-size: 20px; font-weight: 800; color: #111; margin-bottom: 6px; }
.hero-phone-carousel .success-sub { font-size: 13px; color: #888; text-align: center; line-height: 1.5; margin-bottom: 20px; }
.hero-phone-carousel .success-detail { width: 100%; background: #f9fafb; border-radius: 14px; padding: 16px; margin-bottom: 12px; }
.hero-phone-carousel .sd-title { font-size: 13px; font-weight: 700; color: #111; margin-bottom: 10px; }
.hero-phone-carousel .sd-row { display: flex; justify-content: space-between; font-size: 13px; padding: 5px 0; border-bottom: 1px solid #f0f0f0; }
.hero-phone-carousel .sd-row:last-child { border-bottom: none; }
.hero-phone-carousel .sd-l { color: #888; }
.hero-phone-carousel .sd-v { font-weight: 600; color: #222; }
.hero-phone-carousel .success-note { width: 100%; background: #f0fff4; border-radius: 12px; padding: 12px 14px; font-size: 12px; color: #166534; line-height: 1.6; display: flex; gap: 8px; margin-bottom: 20px; }
.hero-phone-carousel .btn-close { width: 100%; background: #2563eb; color: #fff; border: none; border-radius: 12px; padding: 16px; font-size: 16px; font-weight: 700; cursor: pointer; box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 992px) {
    .hero-phone-carousel { --phone-scale: 0.55; }
}

@media (max-width: 768px) {
    .hero-phone-carousel { --phone-scale: 0.5; }
}

@media (max-width: 480px) {
    .hero-phone-carousel { --phone-scale: 0.45; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-phone-track { transition: none; }
}
