/**
 * Royal Atelier — تأثيرات CSS filters
 * blur / brightness / saturate / drop-shadow حسب الثيم
 */

/* ===== أساسيات عامة ===== */
.card, .panel, .r67-card, .st-card, .settings-card,
.modal-box, .custom-alert-box, .dress-item {
  transition:
    filter 0.25s ease,
    backdrop-filter 0.25s ease,
    -webkit-backdrop-filter 0.25s ease,
    box-shadow 0.25s ease !important;
}

/* ===== زجاجي — ضبابية وتشبع ===== */
/* أداء: البطاقات الصغيرة بدون backdrop — يُدار من royal-backdrop.css */
html[data-royal-shape="glass"] .card,
html[data-royal-shape="glass"] .r67-card,
html[data-royal-shape="glass"] .st-card {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html[data-royal-shape="glass"] .modal-box,
html[data-royal-shape="glass"] .custom-alert-box,
html[data-royal-shape="glass"] .print-options-box,
html[data-royal-shape="glass"] .security-modal-box,
html[data-royal-shape="glass"] #quick-action-modal .modal-box,
html[data-royal-shape="glass"] #invoice-modal .modal-box,
html[data-royal-shape="glass"] #royal80-data-modal .royal80-box {
  backdrop-filter: blur(22px) saturate(170%) brightness(1.05) !important;
  -webkit-backdrop-filter: blur(22px) saturate(170%) brightness(1.05) !important;
}

html[data-royal-shape="glass"] .modal-overlay.active,
html[data-royal-shape="glass"] .custom-alert-overlay.active,
html[data-royal-shape="glass"] #security-modal-overlay.active {
  backdrop-filter: blur(8px) brightness(0.85) !important;
  -webkit-backdrop-filter: blur(8px) brightness(0.85) !important;
}

html[data-royal-shape="glass"] #royal-top-menu {
  backdrop-filter: blur(22px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(160%) !important;
}

html[data-royal-shape="glass"] #royal-top-menu .rtm-group {
  backdrop-filter: blur(12px) saturate(150%) !important;
  -webkit-backdrop-filter: blur(12px) saturate(150%) !important;
}

html[data-royal-shape="glass"] .dropdown-content,
html[data-royal-shape="glass"] .dropdown-menu,
html[data-royal-shape="glass"] .actions-menu,
html[data-royal-shape="glass"] #royal-actions-portal > * {
  backdrop-filter: blur(16px) saturate(155%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(155%) !important;
}

html[data-royal-shape="glass"] .btn-neon,
html[data-royal-shape="glass"] .quick-actions button,
html[data-royal-shape="glass"] button.btn {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html[data-royal-shape="glass"] #current-user-display,
html[data-royal-shape="glass"] .royal-user-chip {
  backdrop-filter: blur(12px) saturate(150%) !important;
  -webkit-backdrop-filter: blur(12px) saturate(150%) !important;
}

html[data-royal-shape="glass"] .top-navbar,
html[data-royal-shape="glass"] nav.top-navbar {
  backdrop-filter: blur(16px) saturate(150%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(150%) !important;
}

html[data-royal-shape="glass"] .card:hover,
html[data-royal-shape="glass"] .panel:hover {
  filter: brightness(1.04) !important;
  backdrop-filter: blur(16px) saturate(170%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(170%) !important;
}

/* ===== مستقبلي — توهج drop-shadow ===== */
html[data-royal-shape="futuristic"] .btn-neon:hover,
html[data-royal-shape="futuristic"] .quick-actions button:hover,
html[data-royal-shape="futuristic"] button.btn:hover {
  filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.55)) brightness(1.1) !important;
}

html[data-royal-shape="futuristic"] .btn-neon-green:hover,
html[data-royal-shape="futuristic"] #quick-add-payment:hover {
  filter: drop-shadow(0 0 10px rgba(0, 255, 157, 0.55)) brightness(1.1) !important;
}

html[data-royal-shape="futuristic"] .btn-neon-red:hover {
  filter: drop-shadow(0 0 8px rgba(255, 92, 122, 0.5)) brightness(1.08) !important;
}

html[data-royal-shape="futuristic"] .card:hover,
html[data-royal-shape="futuristic"] .r67-card:hover,
html[data-royal-shape="futuristic"] .st-card:hover {
  filter: drop-shadow(0 0 12px rgba(0, 229, 255, 0.2)) brightness(1.05) !important;
}

html[data-royal-shape="futuristic"] .rnav-item.active,
html[data-royal-shape="futuristic"] .nav-links li.active a,
html[data-royal-shape="futuristic"] .rtm-item.active {
  filter: drop-shadow(0 0 6px rgba(0, 229, 255, 0.35)) !important;
}

html[data-royal-shape="futuristic"] #royal-top-menu {
  backdrop-filter: blur(14px) brightness(0.95) !important;
  -webkit-backdrop-filter: blur(14px) brightness(0.95) !important;
}

html[data-royal-shape="futuristic"] .modal-overlay.active,
html[data-royal-shape="futuristic"] .custom-alert-overlay.active {
  backdrop-filter: blur(6px) brightness(0.7) !important;
  -webkit-backdrop-filter: blur(6px) brightness(0.7) !important;
}

html[data-royal-shape="futuristic"] .modal-box,
html[data-royal-shape="futuristic"] .custom-alert-box {
  filter: drop-shadow(0 0 20px rgba(0, 229, 255, 0.12)) !important;
}

html[data-royal-shape="futuristic"] #current-user-display:hover,
html[data-royal-shape="futuristic"] .royal-user-chip:hover {
  filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.4)) !important;
}

/* أيقونات نيون */
html[data-royal-shape="futuristic"] .card-icon,
html[data-royal-shape="futuristic"] .r67-card .val {
  filter: drop-shadow(0 0 4px rgba(0, 229, 255, 0.35));
}

/* ===== كلاسيكي — ظل ناعم فقط ===== */
html[data-royal-shape="classic"] .card:hover,
html[data-royal-shape="classic"] .panel:hover {
  filter: brightness(1.02) !important;
}
html[data-royal-shape="classic"] .btn-neon:hover {
  filter: brightness(1.05) !important;
}

/* ===== حالات عامة مفيدة ===== */
.ra-blur-sm {
  filter: blur(2px);
}
.ra-blur-md {
  filter: blur(6px);
}
.ra-dim {
  filter: brightness(0.7) saturate(0.85);
}
.ra-glow-gold {
  filter: drop-shadow(0 0 8px rgba(201, 168, 76, 0.5));
}
.ra-glow-cyan {
  filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.5));
}
.ra-sharp {
  filter: contrast(1.08) saturate(1.1);
}

/* صور الفساتين */
.dress-item img, .dress-image img {
  transition: filter 0.3s ease !important;
}
.dress-item:hover img, .dress-image:hover img {
  filter: brightness(1.06) saturate(1.08) !important;
}

/* حقول مخفية في المعاينة */
.inv-field-row.inv-opt-off .inv-field-text {
  filter: grayscale(0.6) opacity(0.5);
}

/* تقليل التأثيرات إن لزم */
@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
  }
}
