/**
 * Lamishtahrer Core — Login Modal Styles
 */

/* ─── Modal Overlay ──────────────────────────────────────────────────────────── */
.lmc-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.lmc-modal[hidden] {
  display: none;
}

.lmc-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
}

/* ─── Modal Box ──────────────────────────────────────────────────────────────── */
.lmc-modal__box {
  position: relative;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
  padding: 40px 36px 32px;
  width: 100%;
  max-width: 400px;
  box-sizing: border-box;
  font-family: 'Absoluti', sans-serif;
  direction: rtl;
  text-align: right;
}

.lmc-modal__box * {
  box-sizing: border-box;
  font-family: 'Absoluti', sans-serif;
}

/* ─── Close Button ───────────────────────────────────────────────────────────── */
.lmc-modal__close-btn {
  position: absolute;
  top: 14px;
  left: 16px;
  background: none !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  font-size: 18px;
  color: #9ca3af;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  border-radius: 0 !important;
}

.lmc-modal__close-btn:hover {
  background: none !important;
  background-color: transparent !important;
  color: #1a1a1a;
}

/* ─── Title ──────────────────────────────────────────────────────────────────── */
.lmc-modal__title {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 24px;
}

/* ─── Error ──────────────────────────────────────────────────────────────────── */
.lmc-modal__error {
  background: #fef0f0;
  border-right: 4px solid #c0392b;
  color: #c0392b;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 18px;
}

/* ─── Form ───────────────────────────────────────────────────────────────────── */
.lmc-modal__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lmc-modal__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lmc-modal__label {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
}

.lmc-modal__input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #dde1e7;
  border-radius: 8px;
  font-size: 15px;
  color: #1a1a1a;
  background: #f7f8fa;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.lmc-modal__input:focus {
  border-color: var(--e-global-color-primary, #1c4f8f);
  background: #fff;
}

/* ─── Remember ───────────────────────────────────────────────────────────────── */
.lmc-modal__remember {
  font-size: 14px;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lmc-modal__remember input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--e-global-color-primary, #1c4f8f);
  flex-shrink: 0;
}

/* ─── Submit ─────────────────────────────────────────────────────────────────── */
.lmc-modal__submit {
  width: 100%;
  background: var(--e-global-color-primary, #1c4f8f);
  color: #fff;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  border-radius: 8px;
  padding: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 4px;
}

.lmc-modal__submit:hover {
  background: #FFC935 !important;
  border: none !important;
}

.lmc-modal__submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* ─── Footer ─────────────────────────────────────────────────────────────────── */
.lmc-modal__footer {
  margin-top: 18px;
  text-align: center;
}

.lmc-modal__forgot {
  font-size: 13px;
  color: #6b7280;
  text-decoration: none;
}

.lmc-modal__forgot:hover {
  color: var(--e-global-color-primary, #1c4f8f);
  text-decoration: underline;
}

/* ─── Description text (forgot password panel) ──────────────────────────────── */
.lmc-modal__desc {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 20px;
  line-height: 1.6;
}

/* ─── Success message ────────────────────────────────────────────────────────── */
.lmc-modal__success {
  background: #f0faf4;
  border-right: 4px solid #22c55e;
  color: #15803d;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 18px;
}

/* ─── Forgot trigger / back button (text button style) ──────────────────────── */
button.lmc-modal__forgot {
  background: none !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  padding: 0 !important;
  cursor: pointer;
  font-size: 13px;
  color: #6b7280;
  font-family: inherit;
}

button.lmc-modal__forgot:hover {
  color: var(--e-global-color-primary, #1c4f8f);
  text-decoration: underline;
  background: none !important;
}

/* ─── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .lmc-modal__box {
    padding: 32px 20px 24px;
  }
}
