/* === الأساسيات === */
.efcc-root {
  position: relative;
  font-family: "Inter", system-ui, sans-serif;
  z-index: 999999;
}

/* === البانر === */
.efcc-banner {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 999998;
  width: min(420px, 92vw);
  background: #f8f8f8;
  border: 1px solid #ddd;
  border-radius: 14px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.15);
  overflow: hidden;
  animation: fadeIn 0.4s ease;
  direction: ltr;
}

[dir="rtl"] .efcc-banner {
  right: auto;
  left: 25px;
  direction: rtl;
}

.efcc-card {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.efcc-title {
  font-size: 17px;
  font-weight: 700;
  margin: 0;
  color: #333;
}

.efcc-text {
  font-size: 14px;
  line-height: 1.5;
  color: #555;
  margin: 0 0 5px 0;
}

.efcc-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.efcc-btn {
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  padding: 9px 16px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.efcc-btn.efcc-primary {
  background: #d25e16;
  color: #fff;
}
.efcc-btn.efcc-primary:hover {
  background: #000;
}
.efcc-btn.efcc-secondary {
  background: #eee;
  color: #333;
}
.efcc-btn.efcc-secondary:hover {
  background: #ddd;
}
.efcc-btn.efcc-link {
  background: transparent;
  color: #555;
  text-decoration: underline;
  padding: 8px 6px;
}
.efcc-btn.efcc-link:hover {
  color: #000;
}

/* === نافذة التخصيص === */
.efcc-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  backdrop-filter: blur(3px);
}
.efcc-modal[hidden] { display: none !important; }

.efcc-modal-content {
  background: #fff;
  border-radius: 14px;
  width: min(500px, 92vw);
  padding: 24px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
  animation: fadeIn 0.3s ease;
}
.efcc-modal-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
  color: #333;
}
.efcc-modal-section {
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.efcc-modal-section label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px 12px;
}
.efcc-modal-section strong { font-size: 14px; color: #222; }
.efcc-modal-section span { font-size: 13px; color: #555; }
.efcc-modal-section input[type="checkbox"] {
  margin-bottom: 4px;
  accent-color: #d25e16;
}
.efcc-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

/* === الزر العائم === */
#efcc-reopen {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 999999 !important;
  background: linear-gradient(145deg, #ffffff, #f1f1f1);
  color: #333;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0,0,0,0.12);
  transition: all 0.4s ease;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  backdrop-filter: blur(2px);
}
#efcc-reopen:hover {
  background: linear-gradient(145deg, #fdfdfd, #e9e9e9);
  border-color: #d25e16;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.18);
  color: #000;
}
[dir="rtl"] #efcc-reopen { right: auto; left: 22px; }

/* === الموبايل === */
@media (max-width: 768px) {
  .efcc-banner {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    border-radius: 0;
    border-top: 1px solid #ccc;
  }
  .efcc-card { padding: 16px; text-align: center; }
  .efcc-title { font-size: 16px; }
  .efcc-text { font-size: 13px; margin-bottom: 10px; }
  .efcc-buttons { justify-content: center; }
  .efcc-btn { flex: 1 1 100%; width: 100%; text-align: center; }
  #efcc-reopen {
    bottom: 16px;
    right: 16px;
    padding: 9px 16px;
    font-size: 13px;
  }
  [dir="rtl"] #efcc-reopen { left: 16px; right: auto; }
}

/* === حركة الظهور === */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: none; }
}
