/* more-options.css - زر المزيد وقائمته المنبثقة */

/* زر المزيد (ثلاث نقاط) - متوافق مع بقية الأزرار */
.more-btn {
  position: absolute;
  bottom: calc(20px + var(--safe-b));
  left: max(10px, var(--safe-l));
  z-index: var(--z-buttons);
  width: var(--btn-size);
  height: var(--btn-size);
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--c-surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* تأثير التمرير (للأجهزة التي تدعم hover) */
@media (hover: hover) {
  .more-btn:hover {
    transform: scale(1.08);
    box-shadow: var(--shadow-lg);
  }
}

/* تأثير الضغط المؤقت (يختفي فور رفع الإصبع) */
.more-btn:active {
  transform: scale(0.92);
  box-shadow: var(--shadow-press, 0 1px 4px rgba(0,0,0,0.2));
  background: linear-gradient(145deg, #2ecc71, #27ae60);
  transition: all 0.08s ease;
}

/* أيقونة الزر في الحالة العادية */
.more-btn svg {
  width: 22px;
  height: 22px;
  fill: var(--c-accent);
  pointer-events: none;
  transition: fill 0.08s ease;
}

/* أيقونة الزر أثناء الضغط (تتحول إلى الأبيض) */
.more-btn:active svg {
  fill: #ffffff;
}

/* ===== قائمة المزيد (Bottom Sheet) ===== */
.more-bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-bottom-sheet, 1100);
  background: var(--store-sheet-bg);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
  transform: translateY(100%);
  transition: var(--store-sheet-transition);
  height: var(--store-sheet-max-expanded, 75vh);
  max-height: var(--store-sheet-max-expanded, 75vh);
  touch-action: pan-y;
  will-change: transform;
}

.more-bottom-sheet.visible {
  transform: translateY(0);
}

.more-sheet-handle {
  display: flex;
  justify-content: center;
  padding: 12px 0 8px;
  cursor: grab;
  touch-action: pan-y;
}

.more-sheet-handle:active {
  cursor: grabbing;
}

.more-handle-bar {
  width: 45px;
  height: 5px;
  background: var(--store-sheet-handle);
  border-radius: 4px;
  opacity: 0.8;
}

.more-sheet-body {
  padding: 0 20px calc(20px + var(--safe-b, 0px));
  overflow-y: auto;
  max-height: calc(var(--store-sheet-max-expanded, 75vh) - 40px);
  direction: rtl;
}

.more-sheet-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--c-text);
  margin: 0 0 16px 0;
  text-align: center;
}

.more-option {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--c-border, #f0f0f0);
  cursor: pointer;
  transition: background 0.15s;
  border-radius: 8px;
  padding: 12px 10px;
}

.more-option:active {
  background: rgba(0, 0, 0, 0.04);
}

.more-option:last-child {
  border-bottom: none;
}

.more-option-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: rgba(46, 204, 113, 0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.more-option-icon svg {
  width: 22px;
  height: 22px;
  fill: var(--c-accent);
}

.more-option-content {
  flex: 1;
}

.more-option-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--c-text);
  margin: 0 0 4px 0;
}

.more-option-desc {
  font-size: 0.85rem;
  color: var(--c-text-muted);
  margin: 0;
  line-height: 1.4;
}

/* ===== Placeholder Pages ===== */
.page-placeholder {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  background: var(--c-surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  direction: rtl;
  padding: 40px;
  animation: pageFadeIn 0.3s ease;
}

.page-placeholder .back-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--c-text);
  padding: 8px 12px;
  border-radius: 30px;
  transition: background 0.2s;
}

.page-placeholder .back-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.page-placeholder h1 {
  font-size: 2rem;
  color: var(--c-accent);
  margin-bottom: 16px;
}

.page-placeholder p {
  font-size: 1rem;
  color: var(--c-text-muted);
  max-width: 400px;
  text-align: center;
}

@keyframes pageFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}