:root{--ah-accent:#06AEFF;--ah-border:#e5e7eb;--ah-bg:#fff;--ah-muted:#6b7280}

.ah-reels-block{margin:20px 0}
.ah-reels-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.ah-reels-title{margin:0;font-size:20px}
.ah-reels-viewall{display:flex;align-items:center;gap:8px;text-decoration:none;font-weight:600}
.ah-reels-count{display:inline-flex;align-items:center;justify-content:center;min-width:28px;height:22px;padding:0 8px;border-radius:999px;background:#f1f3f5;font-size:12px}

.ah-reels-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}
.ah-reels-tab{border:1px solid var(--ah-border);background:var(--ah-bg);border-radius:999px;padding:7px 12px;cursor:pointer;font-weight:800;transition:all .15s ease}
.ah-reels-tab:hover{transform:translateY(-1px)}
.ah-reels-tab.is-active{background:var(--ah-accent);color:#fff;border-color:var(--ah-accent)}

.ah-reels-panels{position:relative}
.ah-reels-panel{display:none}
.ah-reels-panel.is-active{display:block}

/* 카드 ზომა/სტილი (უმჯობესად რბილი) */
.ah-reel-card{display:flex !important;flex-direction:column;gap:6px;padding:6px}
/* Keep cards visually smaller on homepage even when only 1 reel exists */
.ah-reels-block .slick-slide{display:flex !important;justify-content:center}
.ah-reels-block .ah-reel-card{max-width:240px;width:100%}
@media (max-width:480px){.ah-reels-block .ah-reel-card{max-width:320px}}
.ah-reel-card__link{border:0;background:transparent;padding:0;text-align:left;cursor:pointer}
.ah-reel-card__thumb{width:100%;aspect-ratio:9/16;background-size:cover;background-position:center;border-radius:14px;position:relative;overflow:hidden;box-shadow:0 8px 22px rgba(0,0,0,.08)}
.ah-reel-card__meta{padding:2px 2px 0}
.ah-reel-card__desc{font-weight:700;line-height:1.25;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.ah-reel-card__more{font-weight:700;text-decoration:underline;cursor:pointer}
.ah-reel-card__author{font-size:12px;opacity:.75;margin-top:2px}

.ah-reel-card__actions{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:2px}
.ah-ic{border:1px solid rgba(0,0,0,.08);background:#fff;padding:7px 10px;border-radius:999px;cursor:pointer;font-weight:800;display:inline-flex;align-items:center;gap:8px;line-height:1;box-shadow:0 1px 2px rgba(0,0,0,.04);transition:all .15s ease}
.ah-ic:hover{transform:translateY(-1px);box-shadow:0 6px 18px rgba(0,0,0,.08)}
.ah-ic.is-active{border-color:rgba(6,174,255,.35);background:rgba(6,174,255,.10)}

.ah-reels-empty{padding:10px;opacity:.7}

/* slick arrows */
.ah-reels-block .slick-prev,.ah-reels-block .slick-next,.ah-reels-archive .slick-prev,.ah-reels-archive .slick-next{z-index:5}

/* modal */
.ah-reels-modal{position:fixed;inset:0;z-index:999999}
.ah-reels-modal__backdrop{position:absolute;inset:0;background:rgba(0,0,0,.65)}
.ah-reels-modal__dialog{position:relative;margin:30px auto;max-width:860px;width:94%;background:#fff;border-radius:16px;overflow:hidden;box-shadow:0 24px 70px rgba(0,0,0,.35)}
.ah-reels-modal__close{position:absolute;top:10px;right:10px;z-index:5;width:38px;height:38px;border-radius:999px;border:0;background:rgba(0,0,0,.55);color:#fff;font-size:22px;cursor:pointer;display:flex;align-items:center;justify-content:center}
.ah-reels-modal__body{padding:0}
.ah-reels-loading{padding:18px;text-align:center}

.ah-reels-modal__content{display:grid;grid-template-columns:1.2fr .8fr;gap:0}
@media(max-width:900px){.ah-reels-modal__content{grid-template-columns:1fr}}

.ah-reels-modal__video{background:#000}
.ah-reels-player{width:100%;height:auto;display:block;max-height:80vh}

.ah-reels-modal__meta{padding:14px;padding-bottom:18px}
.ah-reels-modal__author{font-weight:800;margin-bottom:8px}
.ah-reels-modal__desc{margin-bottom:12px;line-height:1.45;white-space:normal;word-break:break-word}

.ah-reels-actions{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}
.ah-action{border:1px solid rgba(0,0,0,.10);background:#fff;border-radius:999px;padding:8px 12px;cursor:pointer;font-weight:900;display:inline-flex;align-items:center;gap:10px;box-shadow:0 1px 2px rgba(0,0,0,.04);transition:all .15s ease}
.ah-action:hover{transform:translateY(-1px);box-shadow:0 8px 20px rgba(0,0,0,.10)}
.ah-action.is-active{border-color:rgba(6,174,255,.35);background:rgba(6,174,255,.10)}

/* Mobile modal fix: keep action buttons visible and scroll meta area */
@media (max-width:768px){
  .ah-reels-modal__dialog{margin:0;width:100%;max-width:none;height:100dvh;min-height:100vh;border-radius:0}
  .ah-reels-modal__content{grid-template-columns:1fr}
  .ah-reels-player{max-height:60vh}
  /* Meta area scrolls on mobile so description is always reachable */
  .ah-reels-modal__meta{max-height:40vh;overflow:auto;-webkit-overflow-scrolling:touch;padding-bottom:90px}
  /* Keep action buttons visible (fix for "buttons not visible" on mobile) */
  .ah-reels-actions{position:sticky;bottom:0;background:#fff;padding:10px 0 calc(12px + env(safe-area-inset-bottom));z-index:3;border-top:1px solid var(--ah-border)}
}

/* Make action buttons match AddHome style */
.ah-action{border-color:rgba(11,42,73,.14)}
.ah-action.is-active{border-color:rgba(6,174,255,.45);background:rgba(6,174,255,.12)}
.ah-ic{border-color:rgba(11,42,73,.14)}
.ah-ic.is-active{border-color:rgba(6,174,255,.45);background:rgba(6,174,255,.12)}

.ah-reels-comments__list{max-height:260px;overflow:auto;border:1px solid #eef2f6;border-radius:12px;padding:10px}
.ah-comment{padding:8px 0;border-bottom:1px solid #eef2f6}
.ah-comment:last-child{border-bottom:0}
.ah-comment__head{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px;opacity:.85}
.ah-comment__body{margin-top:4px}
.ah-reels-comments__form{display:flex;gap:8px;margin-top:10px}
.ah-reels-comments__form textarea{flex:1;resize:vertical}
.ah-reels-modal-open{overflow:hidden}

/* archive */
.ah-reels-archive .ah-reels-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
@media (max-width:1024px){.ah-reels-archive .ah-reels-grid{grid-template-columns:repeat(3,1fr)}}
@media (max-width:768px){.ah-reels-archive .ah-reels-grid{grid-template-columns:repeat(2,1fr)}}
@media (max-width:480px){.ah-reels-archive .ah-reels-grid{grid-template-columns:repeat(1,1fr)}}
.ah-reels-pagination{margin-top:16px}


/* Reels slider navigation (VIP-like arrows) */
.ah-reels-block{position:relative}
.ah-reels-nav{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:44px;
  height:44px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.10);
  background:#fff;
  box-shadow:0 10px 24px rgba(0,0,0,.10);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:28px;
  line-height:1;
  color:#0B2A49;
  cursor:pointer;
  z-index:5;
}
.ah-reels-prev{left:-10px}
.ah-reels-next{right:-10px}
.ah-reels-nav:hover{border-color:rgba(6,174,255,.35); color:#06AEFF}
@media (max-width: 640px){
  .ah-reels-prev{left:-6px}
  .ah-reels-next{right:-6px}
}
