/*
  AE Property Requests Manager - Public Styles
  هدف: کارت‌های داشبورد + اسلایدر خوش‌استایل، ریسپانسیو و سبک.
*/

.ae-agent-requests,
.ae-req-slider {
  --ae-prm-radius: 16px;
  --ae-prm-border: rgba(0,0,0,.08);
  --ae-prm-shadow: 0 10px 25px rgba(0,0,0,.06);
  --ae-prm-shadow-sm: 0 6px 18px rgba(0,0,0,.05);
  --ae-prm-bg: #fff;
  --ae-prm-muted: rgba(0,0,0,.6);
}

/* ===== Dashboard boxes ===== */
.ae-agent-requests{
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  box-sizing: border-box;
  padding-inline: 12px;
}

.ae-prm-stats{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 10px 0 18px;
}

.ae-prm-stat{
  background: var(--ae-prm-bg);
  border: 1px solid var(--ae-prm-border);
  border-radius: var(--ae-prm-radius);
  box-shadow: var(--ae-prm-shadow-sm);
  padding: 14px 16px;
}

.ae-prm-stat__label{
  font-size: 13px;
  color: var(--ae-prm-muted);
  margin-bottom: 6px;
}

.ae-prm-stat__value{
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
}

.ae-prm-section-title{
  margin: 18px 0 12px;
  font-size: 18px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(0,0,0,.05), rgba(0,0,0,.01));
  border: 1px solid rgba(0,0,0,.08);
}

.ae-prm-section-title::before{
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.35);
  box-shadow: 0 6px 16px rgba(0,0,0,.12);
  display: inline-block;
}

.ae-prm-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 980px){
  .ae-prm-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px){
  .ae-prm-stats{ grid-template-columns: 1fr; }
  .ae-prm-grid{ grid-template-columns: 1fr; }
  /* mobile: make dashboard sections edge-to-edge (while keeping small gutter) */
  .ae-agent-requests,
  .ae-req-slider{ max-width: 100%; padding-inline: 10px; }
}

/* ===== Cards ===== */
.ae-prm-card,
.ae-req-card{
  background: var(--ae-prm-bg);
  border: 1px solid var(--ae-prm-border);
  border-radius: var(--ae-prm-radius);
  box-shadow: var(--ae-prm-shadow-sm);
  padding: 14px 14px 12px;
  overflow: hidden;
}

.ae-req-card strong{
  display: block;
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 6px;
}

.ae-req-sub{
  font-size: 13px;
  color: var(--ae-prm-muted);
  margin-bottom: 10px;
}

.ae-req-body{
  font-size: 14px;
  line-height: 1.85;
  color: rgba(0,0,0,.78);
  margin-bottom: 12px;
}

.ae-req-assigned{
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--ae-prm-border);
  font-size: 13px;
  color: var(--ae-prm-muted);
}

.ae-req-assigned a{ text-decoration: none; }

.ae-prm-claim-result{
  margin-top: 10px;
  font-size: 13px;
  color: rgba(0,0,0,.7);
}

/* ===== Slider ===== */
.ae-req-slider{
  background: transparent;
  width: 100%;
  box-sizing: border-box;
  padding-inline: 12px;
}

.ae-req-slider-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 0 12px;
}

.ae-req-slider-title{
  font-size: 18px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(0,0,0,.05), rgba(0,0,0,.01));
  border: 1px solid rgba(0,0,0,.08);
}

.ae-req-slider-title::before{
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.35);
  box-shadow: 0 6px 16px rgba(0,0,0,.12);
  display: inline-block;
}

.ae-req-nav{
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--ae-prm-border);
  background: var(--ae-prm-bg);
  box-shadow: var(--ae-prm-shadow-sm);
  cursor: pointer;
  line-height: 1;
  font-size: 18px;
}

.ae-req-track{
  display: flex;
  gap: 14px;
  overflow: auto;
  scroll-snap-type: x mandatory;
  padding: 2px 2px 10px;
  -webkit-overflow-scrolling: touch;
}

.ae-req-track::-webkit-scrollbar{ height: 8px; }
.ae-req-track::-webkit-scrollbar-thumb{ background: rgba(0,0,0,.12); border-radius: 999px; }
.ae-req-track::-webkit-scrollbar-track{ background: transparent; }

.ae-req-track > *{
  scroll-snap-align: start;
  flex: 0 0 320px;
}

@media (max-width: 560px){
  .ae-req-track > *{ flex-basis: 86%; }
}


/* --- Material-ish cards & slider --- */
.ae-req-slider{
  max-width:1200px;
  margin:0 auto;
  /* defaults (can be overridden by Elementor / shortcode) */
  --ae-prm-gap: 14px;
  --ae-prm-nav-bg: #fff;
  --ae-prm-nav-bg-hover: #f7f8fb;
  --ae-prm-nav-color-hover: inherit;
  --ae-prm-dots: rgba(0,0,0,.25);
  --ae-prm-dots-active: #ef4444;
}

.ae-req-track{display:flex;gap:var(--ae-prm-gap, 14px);overflow:auto;scroll-snap-type:x mandatory;padding:10px 4px 14px;scrollbar-width:thin}
.ae-req-track::-webkit-scrollbar{height:10px}
.ae-req-track::-webkit-scrollbar-thumb{border-radius:999px;background:rgba(0,0,0,.18)}
.ae-req-card{min-width:280px;max-width:360px;flex:0 0 auto;scroll-snap-align:start;border-radius:16px;background:#fff;box-shadow:0 6px 18px rgba(0,0,0,.08);border:1px solid rgba(0,0,0,.06);padding:14px 14px 12px;transition:transform .15s ease, box-shadow .15s ease}
.ae-req-card:hover{transform:translateY(-2px);box-shadow:0 10px 26px rgba(0,0,0,.12)}
.ae-req-card strong{font-size:16px;display:block;margin-bottom:6px}
.ae-req-sub{opacity:.75;font-size:13px;margin-bottom:10px}
.ae-req-body{font-size:14px;line-height:1.9;max-height:110px;overflow:hidden}
.ae-req-meta--footer{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:12px;padding-top:10px;border-top:1px dashed rgba(0,0,0,.12);font-size:13px}
.ae-req-badge{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;border:1px solid rgba(0,0,0,.08);background:#f6f7f9;font-weight:700}

/* Icons on badges */
.ae-req-badge::before{display:inline-block;font-size:14px;line-height:1}
.ae-req-badge--new::before{content:"✨"}
.ae-req-badge--assigned::before{content:"👤"}
.ae-req-badge--in_review::before{content:"⏳"}
.ae-req-badge--completed::before{content:"✅"}
.ae-req-badge--closed::before{content:"🔒"}

/* آیکن‌های وضعیت */
.ae-req-badge::before{display:inline-block;line-height:1;font-size:14px}
.ae-req-badge--new::before{content:"✨"}
.ae-req-badge--assigned::before{content:"👤"}
.ae-req-badge--in_review::before{content:"⏳"}
.ae-req-badge--completed::before{content:"✅"}
.ae-req-badge--closed::before{content:"🔒"}
/* جذاب‌تر شدن برچسب‌ها با بک‌گراند بر اساس وضعیت */
.ae-req-badge--new{background:linear-gradient(135deg,#eef6ff,#ffffff);border-color:rgba(59,130,246,.25)}
.ae-req-badge--assigned{background:linear-gradient(135deg,#fff7e6,#ffffff);border-color:rgba(245,158,11,.25)}
.ae-req-badge--in_review{background:linear-gradient(135deg,#f0fdf4,#ffffff);border-color:rgba(34,197,94,.25)}
.ae-req-badge--completed{background:linear-gradient(135deg,#ecfeff,#ffffff);border-color:rgba(14,165,233,.25)}
.ae-req-badge--closed{background:linear-gradient(135deg,#f1f3f4,#ffffff);border-color:rgba(107,114,128,.25)}
.ae-req-assigned a{text-decoration:none}
.ae-req-slider-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:6px}
.ae-req-slider-title{font-weight:800;font-size:18px;display:inline-flex;align-items:center;gap:10px;padding:10px 12px;border-radius:999px;background:linear-gradient(135deg, rgba(0,0,0,.05), rgba(0,0,0,.01));border:1px solid rgba(0,0,0,.08)}
.ae-req-slider-title::before{content:"";width:10px;height:10px;border-radius:999px;background:rgba(0,0,0,.35);box-shadow:0 6px 16px rgba(0,0,0,.12)}
.ae-req-nav{width:38px;height:38px;border-radius:12px;border:1px solid rgba(0,0,0,.08);background:var(--ae-prm-nav-bg,#fff);box-shadow:0 2px 8px rgba(0,0,0,.06);cursor:pointer}
.ae-req-nav:hover{background:var(--ae-prm-nav-bg-hover,#f7f8fb);color:var(--ae-prm-nav-color-hover, currentColor)}

/* Status icons (slider + cards) */
.ae-req-badge{position:relative}
.ae-req-badge::before{display:inline-block;line-height:1;font-size:14px;margin-left:4px;content:""}
.ae-req-badge--new::before{content:"✨"}
.ae-req-badge--assigned::before{content:"👤"}
.ae-req-badge--in_review::before{content:"⏳"}
.ae-req-badge--completed::before{content:"✅"}
.ae-req-badge--closed::before{content:"🔒"}
.ae-req-nav:active{transform:scale(.98)}

.ae-req-dots{display:flex;justify-content:center;align-items:center;gap:8px;margin-top:10px}
.ae-req-dot{width:9px;height:9px;border-radius:999px;border:0;background:var(--ae-prm-dots);opacity:.9;cursor:pointer}
.ae-req-dot.is-active{width:18px;background:var(--ae-prm-dots-active);opacity:1}

.ae-req--no-arrows .ae-req-nav{display:none !important;}
.ae-req--no-dots .ae-req-dots{display:none !important;}
@media (max-width:480px){
  .ae-req-card{min-width:84vw}
  .ae-req-nav{width:34px;height:34px;border-radius:12px}
}

/* ===== Slider cards: standard size + aligned layout (fix22) ===== */
.ae-req-track .ae-req-card{
  flex: 0 0 340px;
  max-width: 340px;
  min-height: 260px;
  display: flex;
  flex-direction: column;
}

.ae-req-track .ae-req-body{
  flex: 1 1 auto;
  min-height: 110px;
  max-height: none;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.ae-req-track .ae-req-meta--footer{
  margin-top: auto;
}

@media (max-width: 560px){
  .ae-req-track .ae-req-card{
    flex-basis: 86vw;
    max-width: 86vw;
    min-height: 240px;
  }
}



/* ===== Responsive & Material-ish polish (v1.0.9) ===== */
.ae-prm-section-title,
.ae-req-slider-title{
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f7f8fb 100%);
  border: 1px solid var(--ae-prm-border);
  box-shadow: var(--ae-prm-shadow-sm);
}

.ae-prm-section-title{
  font-size: 18px;
  font-weight: 900;
}

.ae-req-slider-title{
  font-size: 18px;
  font-weight: 900;
}

.ae-prm-section-title::before,
.ae-req-slider-title::before{
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 6px;
  background: #ef4444; /* accent */
  box-shadow: 0 6px 16px rgba(239,68,68,.25);
}

/* Stats: nicer layout */
.ae-prm-stat{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 14px 16px;
}

.ae-prm-stat__label{
  margin: 0;
  font-size: 13px;
}

.ae-prm-stat__value{
  font-size: 30px;
  font-weight: 900;
}

/* Slider meta line: wrap + LTR numbers */
.ae-req-sub{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap: 8px;
}

.ae-req-sep{
  opacity: .55;
}

.ae-req-phone{
  direction:ltr;
  unicode-bidi: plaintext;
  font-variant-numeric: tabular-nums;
}

.ae-req-city{
  opacity: .9;
}

@media (max-width: 560px){
  .ae-agent-requests,
  .ae-req-slider{
    padding: 0 12px;
  }

  .ae-prm-stat{
    padding: 12px 14px;
  }

  .ae-prm-stat__value{
    font-size: 26px;
  }

  .ae-req-card{
    padding: 12px 12px 10px;
    border-radius: 16px;
  }

  .ae-req-body{
    font-size: 14px;
    line-height: 1.9;
  }

  .ae-req-track{
    gap: 12px;
    padding-bottom: 8px;
  }
}

/* Reduce huge empty space from strong names on small screens */
@media (max-width: 420px){
  .ae-req-slider-head{
    flex-wrap: wrap;
  }
}

/* ===== Agent dashboard advanced (v1.1.3) ===== */
.ae-prm-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:6px}
.ae-prm-dot{opacity:.6; padding: 0 6px;}
.ae-prm-phone-full{direction:ltr; unicode-bidi:plaintext;}

.ae-prm-details{margin-top:10px;border-top:1px dashed rgba(0,0,0,.12);padding-top:10px}
.ae-prm-details summary{cursor:pointer;font-size:13px;color:rgba(0,0,0,.7);user-select:none}
.ae-prm-details-body{margin-top:10px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
@media (max-width:560px){.ae-prm-details-body{grid-template-columns:1fr}}

.ae-prm-kv{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;border:1px solid rgba(0,0,0,.08);border-radius:12px;background:#fafbfc}
.ae-prm-kv span{font-size:12px;opacity:.75}
.ae-prm-kv strong{font-size:13px}

.ae-prm-gf{margin-top:10px}
.ae-prm-gf__title{font-weight:800;margin:10px 0 8px;font-size:13px}

.ae-prm-card-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.ae-prm-card-actions button{border:1px solid rgba(0,0,0,.10);background:#fff;border-radius:12px;padding:9px 12px;cursor:pointer;font-size:13px}
.ae-prm-card-actions button:hover{background:#f7f8fb}
.ae-prm-status-btn--danger{border-color:rgba(239,68,68,.35) !important}
.ae-prm-card--faded{opacity:.65; filter:saturate(.85)}

/* (badge colors are defined in slider badge section above) */


/* ===== Dashboard action buttons (fix contrast) ===== */
.ae-agent-requests .ae-prm-claim-btn{
  appearance:none;
  border:1px solid rgba(0,0,0,.12);
  background: rgba(17,24,39,.92);
  color:#fff !important;
  padding:10px 12px;
  border-radius:12px;
  font-size:14px;
  line-height:1;
  cursor:pointer;
  transition: transform .08s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
}
.ae-agent-requests .ae-prm-claim-btn:hover{
  background: rgba(17,24,39,1);
  box-shadow: 0 10px 22px rgba(0,0,0,.12);
  transform: translateY(-1px);
}
.ae-agent-requests .ae-prm-claim-btn:active{ transform: translateY(0); }
.ae-agent-requests .ae-prm-claim-btn:focus{ outline: none; box-shadow: 0 0 0 3px rgba(17,24,39,.18); }

.ae-agent-requests .ae-prm-status-btn{
  appearance:none;
  border:1px solid rgba(0,0,0,.12);
  background:#fff;
  color: rgba(0,0,0,.86);
  padding:9px 12px;
  border-radius:12px;
  font-size:13px;
  line-height:1;
  cursor:pointer;
  transition: transform .08s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
}
.ae-agent-requests .ae-prm-status-btn:hover{
  background: rgba(0,0,0,.04);
  box-shadow: 0 8px 18px rgba(0,0,0,.08);
  transform: translateY(-1px);
}
.ae-agent-requests .ae-prm-status-btn--danger{
  background: rgba(239,68,68,.10);
  border-color: rgba(239,68,68,.30) !important;
}
.ae-agent-requests .ae-prm-status-btn--danger:hover{
  background: rgba(239,68,68,.14);
}
.ae-agent-requests .ae-prm-card-actions{
  margin-top: 12px;
}
@media (max-width: 680px){
  .ae-agent-requests .ae-prm-card-actions{
    flex-direction: column;
    align-items: stretch;
  }
  .ae-agent-requests .ae-prm-claim-btn,
  .ae-agent-requests .ae-prm-status-btn{
    width:100%;
    justify-content:center;
  }
}

/* ===== Status badge icons (Slider + Dashboard cards) ===== */
.ae-req-badge::before{
  display:inline-block;
  font-size:14px;
  line-height:1;
  margin-left:2px;
}
.ae-req-badge--new::before{content:"✨";}
.ae-req-badge--assigned::before{content:"👤";}
.ae-req-badge--in_review::before{content:"⏳";}
.ae-req-badge--completed::before{content:"✅";}
.ae-req-badge--closed::before{content:"🔒";}

/* ===== Slider card footer buttons ===== */
.ae-prm-card-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:12px;
  padding-top:10px;
  border-top:1px solid rgba(0,0,0,.08);
}

/* Slider "مشاهده" should sit at the bottom (stacked footer) */
.ae-req-track .ae-prm-card-footer{
  flex-direction: column-reverse;
  align-items: stretch;
}
.ae-req-track .ae-prm-card-footer .ae-prm-btn{
  width: 100%;
}
.ae-prm-card-footer__form{margin:0}
.ae-prm-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:9px 12px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.12);
  text-decoration:none;
  cursor:pointer;
  font-size:13px;
  font-weight:700;
  background:#fff;
}
.ae-prm-btn:hover{background:#f7f8fb}
.ae-prm-btn--primary{
  background:#111827;
  color:#fff;
  border-color:rgba(17,24,39,.35);
}
.ae-prm-btn--primary:hover{background:#0b1220}
.ae-prm-btn--ghost{background:#fff}

@media (max-width: 680px){
  .ae-prm-card-footer{flex-direction:column;align-items:stretch}
  .ae-prm-card-footer .ae-prm-btn{width:100%}
}

/* ===== Responsive modal ===== */
.ae-prm-modal{position:fixed;inset:0;z-index:999999;display:none}
.ae-prm-modal.is-open{display:block}
.ae-prm-modal__backdrop{position:absolute;inset:0;background:rgba(0,0,0,.45)}
.ae-prm-modal__dialog{
  position:relative;
  margin:40px auto;
  width:min(920px, 94vw);
  max-height:calc(100vh - 80px);
  background:#fff;
  border-radius:18px;
  box-shadow:0 18px 60px rgba(0,0,0,.28);
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
.ae-prm-modal__close{
  position:absolute;
  top:10px;
  left:10px;
  width:38px;
  height:38px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.12);
  background:#fff;
  cursor:pointer;
  font-size:22px;
  line-height:1;
}
.ae-prm-modal__close:hover{background:#f7f8fb}
.ae-prm-modal__body{padding:18px 18px 22px;overflow:auto}
.ae-prm-modal__loading,
.ae-prm-modal__fallback{padding:20px;text-align:center}

html.ae-prm-modal--open, body.ae-prm-modal--open{overflow:hidden}

/* Completion note box (agent dashboard) */
.ae-prm-completion-note{margin-top:14px;padding:12px;border:1px solid rgba(0,0,0,.12);border-radius:14px;background:#fafbff}
.ae-prm-completion-note__title{font-weight:700;margin-bottom:8px}
.ae-prm-completion-note__textarea{width:100%;max-width:100%;min-height:92px;resize:vertical;border-radius:12px;border:1px solid rgba(0,0,0,.18);padding:10px;line-height:1.8;background:#fff}
.ae-prm-completion-note__actions{display:flex;align-items:center;gap:10px;margin-top:10px;flex-wrap:wrap}
.ae-prm-completion-note__msg{font-size:13px;opacity:.8}

@media (max-width: 600px){
  .ae-prm-modal__dialog{margin:0;width:100vw;max-height:100vh;border-radius:0}
  .ae-prm-modal__body{padding:14px}
  .ae-prm-modal__close{top:10px;left:10px}
}
