/* ===== Shared styles for all Palestine pages ===== */
/* Brand palette (from Match NOW logo) */
:root {
  --brand-green: #228b22;
  --brand-green-dark: #145214;
  --brand-gold: #ffd700;
  --brand-gold-dark: #c9a700;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

/* ----- Layout helpers ----- */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 15px;
}

.row {
  display: flex;
  flex-wrap: wrap;
}

.d-flex {
  display: flex;
}

.justify-content-center {
  justify-content: center;
}

.align-items-center {
  align-items: center;
}

.text-center {
  text-align: center;
}

.gap-1 {
  gap: 0.25rem;
}

/* ----- Spacing ----- */
.mt-2 {
  margin-top: 0.5rem;
}

.mt-4 {
  margin-top: 1.5rem;
}

.px-4 {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ----- Widths ----- */
.w-100 {
  width: 100%;
}

.w-50 {
  width: 50%;
}

/* ----- Responsive columns ----- */
.col-12 {
  width: 100%;
}

@media (min-width: 768px) {
  .col-md-6 {
    width: 50%;
  }
}

/* ----- Form controls ----- */
.form-control {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #212529;
  background-color: #fff;
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  outline: none;
}

.form-control:focus {
  border-color: var(--brand-green);
  box-shadow: 0 0 0 0.2rem rgba(34, 139, 34, 0.25);
}

/* ----- Buttons ----- */
.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  border: none;
  border-radius: 0.375rem;
}

.text-white {
  color: #fff;
}

.btn-signup {
  background: linear-gradient(135deg, var(--brand-green) 0%, var(--brand-green-dark) 100%);
  transition: filter 0.15s ease, box-shadow 0.15s ease;
}

.btn-signup:hover {
  filter: brightness(1.08);
  box-shadow: 0 4px 12px rgba(20, 82, 20, 0.35);
}

.btn-signup:active {
  filter: brightness(0.95);
}

/* ----- Phone field ----- */
.phone-prefix {
  flex: 0 0 64px;
  width: 64px;
  text-align: center;
  background-color: #f1f1f1;
  color: #495057;
  font-weight: 600;
}

.phone-number {
  flex: 1 1 auto;
  width: auto;
}

/* ----- Messages ----- */
.alert-error,
.alert-success {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.5;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.alert-error {
  color: #842029;
  background-color: #fff5f5;
  border: 1px solid #f1aeb5;
  box-shadow: 0 2px 6px rgba(132, 32, 41, 0.08);
}

.alert-error p {
  margin: 0;
  font-weight: 600;
}

.alert-success {
  color: #0f5132;
  background-color: #edf7f1;
  border: 1px solid #a3cfbb;
  box-shadow: 0 2px 6px rgba(15, 81, 50, 0.08);
}

.alert-success p {
  margin: 0;
  font-weight: 600;
}

/* ----- Page specific ----- */
.login {
  background-image: linear-gradient(160deg, var(--brand-green) 0%, var(--brand-green-dark) 55%, var(--brand-gold-dark) 100%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.bg-w {
  background-color: #fff;
  border: 1px solid #fff;
  border-radius: 1rem;
  padding-bottom: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  border-top: 4px solid var(--brand-gold);
  overflow-x: hidden;
}

h4 {
  color: var(--brand-green);
}

.logo {
  width: 200px;
  height: 100px;
  object-fit: contain;
}

.rtl {
  direction: rtl;
}

/* ----- Language switcher ----- */
.lang-switch {
  display: flex;
  justify-content: flex-end;
}

.lang-select {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  color: #212529;
  background-color: #fff;
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  cursor: pointer;
  outline: none;
}

.lang-select:focus {
  border-color: var(--brand-green);
  box-shadow: 0 0 0 0.15rem rgba(34, 139, 34, 0.25);
}

/* ----- Disclaimer ----- */
.disclaimer {
  font-size: 0.85rem;
  color: #555;
  line-height: 1.6;
}

/* RTL tweaks driven by the language switcher */
[dir="rtl"] .lang-switch {
  justify-content: flex-start;
}
