/* =========================================================
   Raykan Prompts Pro — CLEAN SINGLE CSS (NO DUPLICATES)
   Fix: RTL fill from right + no center + no huge cards + modal
   ========================================================= */

/* ---------- Tokens ---------- */
:root{
  --rk-text: rgba(255,255,255,.92);
  --rk-text2: rgba(255,255,255,.72);

  --rk-glass: rgba(255,255,255,.08);
  --rk-glass2: rgba(255,255,255,.05);
  --rk-stroke: rgba(255,255,255,.14);
  --rk-stroke2: rgba(255,255,255,.10);

  --rk-accent: #20e3d2;
  --rk-accent2:#25b6ff;

  --rk-radius: 22px;
  --rk-radius-sm: 14px;
  --rk-blur: 14px;

  --rk-shadow: 0 18px 70px rgba(0,0,0,.45);
  --rk-shadow2: 0 10px 30px rgba(0,0,0,.28);
}

/* =========================================================
   BASE / RTL
   ========================================================= */
.rk-prompts-widget{ direction: rtl; }
.rk-prompts-widget, .rk-prompts-widget *{ box-sizing: border-box; }
.raykan-prompt-card{ overflow:hidden; }
.raykan-prompt-thumb{ position:relative; overflow:hidden; }

/* =========================================================
   FILTER BAR (Glass)
   ========================================================= */
.rk-prompts-widget .rk-filterbar{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-start;
  gap:10px;

  padding: 12px;
  margin: 0 0 18px;

  border-radius: var(--rk-radius);
  background:
    radial-gradient(900px 220px at 15% 0%, rgba(32,227,210,.16), transparent 60%),
    radial-gradient(700px 220px at 85% 35%, rgba(37,182,255,.14), transparent 60%),
    linear-gradient(180deg, var(--rk-glass), var(--rk-glass2));
  border: 1px solid var(--rk-stroke);
  box-shadow: var(--rk-shadow2);
  backdrop-filter: blur(var(--rk-blur));
  -webkit-backdrop-filter: blur(var(--rk-blur));

  position: relative;
  overflow: hidden;
}

/* subtle sheen */
.rk-prompts-widget .rk-filterbar::before{
  content:"";
  position:absolute;
  inset:-60% -30%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.10), transparent);
  transform: rotate(12deg);
  animation: rk_sheen 7s linear infinite;
  pointer-events:none;
  opacity:.55;
}
@keyframes rk_sheen{
  0%{ transform: translateX(-20%) rotate(12deg); }
  100%{ transform: translateX(20%) rotate(12deg); }
}

.rk-prompts-widget .rk-filterbar input[type="search"],
.rk-prompts-widget .rk-filterbar select{
  height: 44px;
  min-width: 170px;
  padding: 0 14px;

  border-radius: 999px;
  border: 1px solid var(--rk-stroke2);
  background: rgba(0,0,0,.22);

  color: var(--rk-text);
  outline: none;
  transition: .22s ease;
}

.rk-prompts-widget .rk-filterbar input[type="search"]::placeholder{
  color: rgba(255,255,255,.55);
}

.rk-prompts-widget .rk-filterbar input[type="search"]:focus,
.rk-prompts-widget .rk-filterbar select:focus{
  border-color: rgba(32,227,210,.55);
  box-shadow: 0 0 0 4px rgba(32,227,210,.12);
  transform: translateY(-1px);
}

.rk-prompts-widget .rk-filterbar select option{ color:#111; }

.rk-prompts-widget .rk-filterbar label{
  height: 44px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 0 14px;

  border-radius: 999px;
  border: 1px solid var(--rk-stroke2);
  background: rgba(0,0,0,.22);
  color: var(--rk-text);
  cursor:pointer;

  transition: .22s ease;
}
.rk-prompts-widget .rk-filterbar label:hover{
  border-color: rgba(37,182,255,.55);
  transform: translateY(-1px);
}
.rk-prompts-widget .rk-filterbar input[type="checkbox"]{
  width:16px; height:16px; margin:0;
  accent-color: var(--rk-accent);
}
.rk-prompts-widget .rk-filterbar .rk-status{
  margin-right: auto; /* RTL => میره سمت چپ */
  font-size: 13px;
  color: var(--rk-text2);
  white-space: nowrap;
}

@media (max-width: 767px){
  .rk-prompts-widget .rk-filterbar input[type="search"],
  .rk-prompts-widget .rk-filterbar select{
    flex: 1 1 160px;
    min-width: 0;
  }
  .rk-prompts-widget .rk-filterbar .rk-status{
    width:100%;
    text-align:center;
    margin-right:0;
  }
}

/* =========================================================
   EMPTY
   ========================================================= */
.rk-empty{
  padding: 18px;
  border-radius: 16px;
  border: 1px dashed rgba(255,255,255,.18);
  color: var(--rk-text2);
  background: rgba(0,0,0,.18);
}

/* =========================================================
   GRID — Fill from RIGHT (No Center)
   ========================================================= */
.rk-prompts-widget .raykan-prompts-grid{
  justify-content: start;
  justify-items: stretch;
  align-items: stretch;
}
.rk-prompts-widget .raykan-prompts-grid .raykan-prompt-card{
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

/* =========================================================
   SLIDER (Swiper) — Fill from RIGHT + No Huge Cards
   ========================================================= */
.rk-prompts-widget .raykan-prompts-slider,
.rk-prompts-widget .swiper{
  width: 100%;
}

/* Swiper RTL */
.rk-prompts-widget .swiper{
  direction: rtl;
}

/* IMPORTANT: remove old centering behavior */
.rk-prompts-widget .swiper-slide{
  display: block !important;       /* no flex center */
  height: auto;
}

/* stick card to the right */
.rk-prompts-widget .swiper-slide .raykan-prompt-card{
  width: 100% !important;
  max-width: 420px !important;     /* کنترل بزرگ نشدن */
  margin-right: 0 !important;
  margin-left: auto !important;    /* RTL => می‌چسبد به راست */
}

@media (max-width: 767px){
  .rk-prompts-widget .swiper-slide .raykan-prompt-card{
    max-width: 360px !important;
  }
}

/* Arrows RTL-friendly */
.rk-prompts-widget .swiper-button-prev{
  right: 10px;
  left: auto;
}
.rk-prompts-widget .swiper-button-next{
  left: 10px;
  right: auto;
}

/* =========================================================
   CARD (Glass + Hover)
   ========================================================= */
.rk-prompts-widget .raykan-prompt-card{
  border-radius: var(--rk-radius);
  border: 1px solid var(--rk-stroke);
  background:
    radial-gradient(900px 260px at 20% 0%, rgba(32,227,210,.14), transparent 60%),
    radial-gradient(700px 240px at 80% 35%, rgba(37,182,255,.12), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.05));
  box-shadow: var(--rk-shadow2);
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
.rk-prompts-widget .raykan-prompt-card:hover{
  transform: translateY(-8px);
  border-color: rgba(32,227,210,.30);
  box-shadow: var(--rk-shadow);
}

/* =========================================================
   MEDIA 1:1 (1080x1080 feel) — CARD
   ========================================================= */
.rk-prompts-widget .raykan-prompt-thumb{
  position: relative;
  margin: 14px;
  border-radius: calc(var(--rk-radius) - 4px);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.20);

  aspect-ratio: 1 / 1; /* مربع */
}

.rk-prompts-widget .raykan-prompt-thumb img,
.rk-prompts-widget .raykan-prompt-thumb video{
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* =========================================================
   BADGES
   ========================================================= */
.raykan-pillstack{
  position:absolute;
  top:12px; left:12px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  z-index:3;
  max-width: calc(100% - 24px);
}
.raykan-pill{
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  line-height:1;

  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.16);
  color: rgba(255,255,255,.92);

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  animation: rk_pop .5s ease both;
}
@keyframes rk_pop{
  from{ transform: translateY(-6px); opacity: 0; }
  to  { transform: translateY(0); opacity: 1; }
}
.raykan-pill--alt{ background: rgba(0,0,0,.22); }
.raykan-pill--new{
  background: linear-gradient(90deg, rgba(37,182,255,.25), rgba(32,227,210,.22));
}
.raykan-pill--pop{
  background: linear-gradient(90deg, rgba(255,176,32,.22), rgba(255,79,216,.14));
}

/* play btn */
.raykan-media-play{
  position:absolute;
  inset:auto 14px 14px auto;
  width:44px; height:44px;
  border-radius:14px;
  display:grid; place-items:center;
  background: rgba(0,0,0,.35);
  border:1px solid rgba(255,255,255,.16);
  color:#fff;
  z-index:3;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.raykan-media-play svg{ width:18px; height:18px; }

/* =========================================================
   CARD BODY + ACTIONS
   ========================================================= */
.rk-prompts-widget .raykan-prompt-body{
  padding: 0 16px 16px;
}
.rk-prompts-widget .raykan-prompt-title{
  margin: 8px 0 12px;
  font-weight: 900;
  font-size: 18px;
  color: var(--rk-text);
}
.raykan-prompt-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.raykan-copy-btn,
.raykan-share-btn,
.raykan-open-btn{
  cursor:pointer;
  text-decoration:none;

  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;

  height: 42px;
  padding: 0 14px;

  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.22);
  color: var(--rk-text);

  font-weight: 900;
  font-size: 13px;
  line-height: 1;

  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.raykan-copy-btn{
  background: linear-gradient(90deg, rgba(32,227,210,.20), rgba(37,182,255,.18));
  border-color: rgba(32,227,210,.28);
}
.raykan-copy-btn:hover,
.raykan-share-btn:hover,
.raykan-open-btn:hover{
  transform: translateY(-2px);
  border-color: rgba(32,227,210,.55);
  box-shadow: 0 10px 24px rgba(32,227,210,.12);
}

.raykan-prompt-text{ display:none; }

/* =========================================================
   MODAL (Full, kept)
   ========================================================= */
.rk-modal{ position:fixed; inset:0; z-index:999999; display:none; direction: rtl; }
.rk-modal.is-open{ display:block; }

.rk-modal__backdrop{
  position:absolute; inset:0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.rk-modal__panel{
  position:absolute;
  left:50%; top:50%;
  transform: translate(-50%,-50%);
  width: min(980px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow:auto;

  border-radius: var(--rk-radius);
  background:
    radial-gradient(1000px 360px at 20% 0%, rgba(32,227,210,.18), transparent 60%),
    radial-gradient(900px 360px at 80% 35%, rgba(37,182,255,.14), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.06));
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 30px 100px rgba(0,0,0,.55);
  color: var(--rk-text);
}

.rk-modal__header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:16px 18px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}

.rk-modal__title{
  margin:0;
  font-weight:900;
  font-size:18px;
}

.rk-modal__close{
  border:1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.22);
  color:#fff;
  border-radius: var(--rk-radius-sm);
  padding:10px 12px;
  cursor:pointer;
  font-weight:900;
}

.rk-modal__content{
  display:grid;
  gap:16px;
  padding:16px 18px 18px;
}
@media(min-width:900px){
  .rk-modal__content{
    grid-template-columns: 1.2fr .8fr;
    align-items:start;
  }
}

/* modal media 1:1 */
.rk-modal__media{
  border-radius: 18px;
  overflow:hidden;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);

  aspect-ratio: 1 / 1;
}
.rk-modal__media img,
.rk-modal__media video,
.rk-modal__media iframe{
  width:100% !important;
  height:100% !important;
  display:block;
  object-fit: cover;
  border:0;
}

.rk-modal__side{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.rk-modal__pillrow{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.rk-modal__pill{
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.22);
}

.rk-modal__prompt{
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
  padding:12px;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255,255,255,.88);
}

.rk-modal__actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.rk-modal__actions .raykan-copy-btn,
.rk-modal__actions .raykan-share-btn,
.rk-modal__actions .raykan-open-btn{
  background: rgba(0,0,0,.22);
  border: 1px solid rgba(255,255,255,.14);
  color:#fff;
}

/* =========================================================
   Reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce){
  .raykan-pill,
  .rk-prompts-widget .raykan-prompt-card,
  .rk-prompts-widget .rk-filterbar::before{
    animation: none !important;
    transition: none !important;
  }
}
