/* MAIN CARD */
.insta-post { width: 100%; max-width: 450px; margin: 20px auto; background: #fff; border-radius: 10px; border: 1px solid #e5e5e5; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,0.10); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important; }

/* HEADER */
.insta-header { display: flex; align-items: center; gap: 12px; padding: 12px; padding-bottom: 5px; }
.insta-dp-wrap { width: 44px; height: 44px; flex-shrink: 0; }
.insta-letter-avatar { width: 44px; height: 44px; border-radius: 50%; background: #ccc; color: #fff; font-weight: 800; font-size: 20px; display: flex; align-items: center; justify-content: center; text-transform: uppercase; }
.insta-user { display: flex; flex-direction: column; line-height: 1.2; }
.insta-user b { font-size: 15px; font-weight: 700; color: #111; }
.insta-location { font-size: 12px; color: #777; }
.insta-location i { margin-right: 4px; font-size: 13px; color: #ef4444; }

/* CAPTION */
.insta-header-caption { display: block; padding: 2px 12px 15px 12px; font-weight: 700; font-size: 14px; color: #262626; line-height: 1.4; }

/* SLIDER (Scrolling Fix Applied) */
.insta-image-box { width: 100%; background: #000; position: relative; }
.insta-slider {
    display: flex; overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-snap-stop: always; /* Ensures it stops at every slide */
    /* scroll-behavior: smooth;  <-- REMOVED for stricter touch swipe */
    width: 100%; aspect-ratio: 4 / 5;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.insta-slider::-webkit-scrollbar { display: none; }
.insta-slide { flex: 0 0 100%; width: 100%; height: 100%; scroll-snap-align: center; position: relative; }
.insta-slide img, .insta-slide video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 🔥 NEW: IMAGE COUNTER STYLING */
.insta-counter {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(38, 38, 38, 0.8); /* Semi-transparent black */
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 14px; /* Rounded corners like screenshot */
    z-index: 10;
    pointer-events: none; /* Click through */
}

/* DOTS */
.insta-dots { position: absolute; bottom: 15px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 5; pointer-events: none; }
.insta-dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.4); transition: all 0.2s ease; }
.insta-dots span.active { background: #fff; transform: scale(1.2); }

/* VIDEO CONTROLS */
.insta-video-wrap { position: relative; width: 100%; height: 100%; }
.insta-volume-btn { position: absolute; bottom: 15px; right: 15px; z-index: 10; width: 30px; height: 30px; background: rgba(0, 0, 0, 0.6); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #fff; font-size: 14px; }
.insta-center-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 60px; color: rgba(255, 255, 255, 0.9); z-index: 5; pointer-events: none; opacity: 0; transition: opacity 0.2s ease-in-out; filter: drop-shadow(0 2px 5px rgba(0,0,0,0.5)); }
.insta-video-wrap.video-paused .insta-center-play { opacity: 1; }

/* ACTIONS & SHEET */
.insta-actions { padding: 10px 12px; font-size: 22px; }
.insta-actions i, .insta-actions a i { margin-right: 15px; cursor: pointer; transition: transform 0.15s ease; }
.insta-actions i:active { transform: scale(1.25); }
.insta-like-btn.liked { color: #ef4444; }
.insta-likes { padding: 5px 12px; font-weight: 700; font-size: 14px; margin-bottom: 5px; }
.insta-view-comments { padding: 0 12px 15px; color: #777; font-size: 13px; cursor: pointer; }
.comment-sheet { position: fixed; left: 0; right: 0; bottom: 0; height: 70vh; background: #fff; border-radius: 20px 20px 0 0; transform: translateY(100%); transition: transform 0.35s ease-in-out; z-index: 999999; overflow-y: auto; box-shadow: 0 -8px 25px rgba(0,0,0,0.25); }
.comment-sheet.open { transform: translateY(0); }
.comment-sheet h3 { margin: 0 0 15px 10px; }
.close-sheet { position: sticky; top: 0; background: #fff; padding: 12px; text-align: right; font-size: 22px; cursor: pointer; z-index: 10; }
.ncmt-content { margin: 0 15px !important; }

/* AVATAR COLORS */
.av-red { background:#ef4444 !important; } .av-green { background:#22c55e !important; }
.av-yellow { background:#facc15 !important; color:#222; } .av-pink { background:#ec4899 !important; }
.av-blue { background:#3b82f6 !important; } .av-violet { background:#8b5cf6 !important; }
.av-orange { background:#f97316 !important; } .av-teal { background:#14b8a6 !important; }
.av-brown { background:#92400e !important; } .av-gray { background:#6b7280 !important; }
.insta-play-link i { color: #3b82f6; background: none; }

/* 🔥 CAPTION FIX */
.insta-header-caption {
    display: block;
    /* Top: 2px | Right: 12px | Bottom: 15px (Photo se gap) | Left: 12px */
    padding: 0 10px 8px 10px;
    font-weight: 700;
    font-size: 14px;
    color: #262626;
    line-height: 1.4;
}

/* ================= VIDEO CENTER PLAY ICON ================= */
/* Center Play Button Icon Styling */
.insta-center-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 60px;
    color: rgba(255, 255, 255, 0.9);
    z-index: 5; /* Volume button (z-index 10) ke neeche rahega */
    pointer-events: none; /* Click iske aar-paar video par lagega */
    opacity: 0; /* Default hidden (jab play ho raha ho) */
    transition: opacity 0.2s ease-in-out;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.5));
}

/* Jab video pause ho, tabhi icon dikhega */
.insta-video-wrap.video-paused .insta-center-play {
    opacity: 1;
}
