/* ogirish/assets/style.css - نسخه نهایی و تمیز + هدر 100% واقعی */

/* =============================
   Theme variables
   ============================= */
:root {
  --bg-color: #061a3a;         /* آبی خیلی تیره */
  --panel-bg: transparent;

  --btn-color: #ffc107;
  --btn-hover: #ffca2c;
  --btn-text: #000000;

  --text-color: #ffffff;
  --label-color: #ffffff;

  --border-color: #4a76c0;
  --header-bg: rgba(255, 255, 255, 0.10);

  --ui-font: 'Vazirmatn', sans-serif;
  --arabic-text-font: 'Noto Naskh Arabic', 'Vazirmatn', serif;

  --radius-lg: 14px;
  --radius-md: 12px;
  --shadow-soft: 0 10px 30px rgba(0,0,0,0.25);
  --shadow-strong: 0 15px 35px rgba(0,0,0,0.30);
}

/* =============================
   Reset / Base
   ============================= */
* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  font-family: var(--ui-font);
  background-color: var(--bg-color);
  margin: 0;
  color: var(--text-color);

  /* مهم: دیگر flex نیست */
  display: block;

  /* فاصله کلی صفحه */
  padding: 0;
}

/* فاصله استاندارد محتوا از اطراف */
.main-wrapper {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;        /* وسط چین */
  padding: 20px;         /* فاصله داخلی */
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--panel-bg);
}

/* =============================
   Header full width overrides
   (headerx.php)
   ============================= */

/* هدر و نوار بالا تمام عرض صفحه */
header,
.site-header,
.main-header,
.navbar,
.topbar,
nav {
  width: 100% !important;
  max-width: 100% !important;
}

/* اگر بوتسترپ container داخل هدر عرض را محدود کرده */
header .container,
header .container-fluid,
.site-header .container,
.site-header .container-fluid,
.navbar .container,
.navbar .container-fluid,
nav .container,
nav .container-fluid {
  width: 100% !important;
  max-width: 100% !important;
}

/* اگر هدر padding دارد و حاشیه سفید می‌دهد، کنترلش کن */
header,
.site-header,
.main-header,
.navbar,
.topbar,
nav {
  background: var(--bg-color) !important;
  margin: 0 !important;
  border-radius: 0 !important;
}

/* اگر داخل هدر title/p هست */
header h1 {
  color: var(--text-color);
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
header p {
  color: #cbdcf7;
  margin-top: 10px;
  font-weight: 400;
  font-size: 12px;
  opacity: 0.85;
}

/* =============================
   Converter layout
   ============================= */
.converter-container {
  display: flex;
  gap: 30px;
  background: transparent;
  padding: 10px;
  flex-wrap: wrap;
  align-items: flex-start;
}

/* Desktop order: Lotin left, Arab right */
@media (min-width: 821px) {
  .converter-container {
    direction: ltr; /* ترتیب ستون‌ها از چپ به راست */
  }
  .converter-container .column:first-child { order: 1; }
  .converter-container .column:last-child  { order: 2; }
}

.column {
  flex: 1;
  min-width: 300px;
  display: flex;
  flex-direction: column;
}

/* =============================
   Column header (glass)
   ============================= */
.column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;

  background-color: var(--header-bg);
  padding: 12px 18px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;

  border: 1px solid rgba(255, 255, 255, 0.20);
  border-bottom: none;
  margin-bottom: 0;

  backdrop-filter: blur(6px);
}

.column-header span {
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}

.column-header span::before {
  content: '';
  display: block;
  width: 4px;
  height: 18px;
  background-color: var(--btn-color);
  border-radius: 4px;
}

/* =============================
   Textareas
   ============================= */
textarea {
  width: 100%;
  height: 400px;
  padding: 18px;

  border-radius: 0 0 var(--radius-md) var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-top: 1px solid rgba(0,0,0,0.05);

  font-size: 14px;
  line-height: 1.8;
  resize: none;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;

  background: #ffffff;
  color: #222;

  box-shadow: var(--shadow-soft);
  -webkit-text-size-adjust: 100%;
}

#latinInput { font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }

#arabicOutput {
  font-family: var(--arabic-text-font);
  font-size: 15px;
}

textarea:focus {
  border-color: var(--btn-color);
  box-shadow: var(--shadow-strong);
}

/* =============================
   Buttons (gold)
   ============================= */
button {
  font-family: var(--ui-font);
  cursor: pointer;
  border: none;
  background-color: var(--btn-color);
  color: var(--btn-text);

  padding: 8px 18px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2px;

  box-shadow: 0 6px 14px rgba(0,0,0,0.22);
  transition: transform 0.15s, box-shadow 0.15s, background-color 0.15s;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  user-select: none;
}

button:hover {
  background-color: var(--btn-hover);
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(0,0,0,0.28);
}

button:active {
  transform: translateY(0);
  box-shadow: 0 6px 14px rgba(0,0,0,0.22);
}

/* دکمه‌ها داخل هدر ستون، در موبایل باید تمام عرض شوند (در ریسپانسیو پایین) */
.btn-convert,
.btn-copy {
  white-space: nowrap;
}

/* =============================
   Word button
   ============================= */
.nav-buttons {
  text-align: center;
  margin: 18px 0 8px;
}

.btn-word-link {
  text-decoration: none;
  display: inline-block;
  width: 100%;
  max-width: 560px;
}

.btn-word-link button {
  font-size: 16px;
  padding: 12px 16px;
  width: 100%;

  background-color: transparent;
  border: 2px solid var(--btn-color);
  color: var(--btn-color);
  border-radius: var(--radius-lg);

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-word-link button:hover {
  background-color: var(--btn-color);
  color: #000;
}

/* =============================
   Admin link
   ============================= */
.admin-link {
  text-align: center;
  margin-top: 30px;
  padding-bottom: 20px;
}

.admin-link a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-size: 12px;
  transition: color 0.2s;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.35);
}

.admin-link a:hover {
  color: var(--btn-color);
  border-color: var(--btn-color);
}

/* =============================
   Overlay (processing)
   ============================= */
.processing-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(6, 26, 58, 0.95);
  z-index: 10000;

  flex-direction: column;
  justify-content: center;
  align-items: center;

  color: #fff;
  font-family: var(--ui-font);
  padding: 18px;
  text-align: center;
}

.loader {
  border: 5px solid #f3f3f3;
  border-top: 5px solid var(--btn-color);
  border-radius: 50%;
  width: 52px;
  height: 52px;
  animation: spin 1s linear infinite;
  margin-bottom: 18px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.btn-cancel {
  margin-top: 16px;
  padding: 10px 22px;
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s, border-color 0.2s;
}

.btn-cancel:hover {
  background: #f44336;
  border-color: #f44336;
}

/* =============================
   Responsive
   ============================= */
@media (max-width: 820px) {
  .main-wrapper {
    padding: 14px;
  }

  .converter-container {
    flex-direction: column;
    gap: 12px;
    padding: 6px;
  }

  .column { width: 100%; }

  .column-header {
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 12px 14px;
  }

  .column-header span {
    font-size: 13px;
  }

  .btn-convert,
  .btn-copy {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 15px;
  }

  #latinInput,
  #arabicOutput {
    width: 100%;
    min-height: 170px;
    height: 250px;
    font-size: 16px;
    line-height: 1.8;

    /* موبایل: گردی کامل‌تر */
    border-radius: var(--radius-lg);
  }

  /* وقتی textarea گردی کامل دارد، header هم بهتر است جدا شود */
  textarea {
    border-radius: var(--radius-lg);
  }

  .nav-buttons {
    margin: 14px 0 10px;
  }

  .admin-link {
    margin-top: 10px;
  }

  .admin-link a {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 12px;
  }
}

@media (max-width: 420px) {
  #latinInput, #arabicOutput {
    min-height: 155px;
  }

  .btn-word-link button {
    font-size: 14px;
  }
}

/* =============================
   Optional: prevent horizontal scroll
   (خیلی‌ها با یک margin اشتباه اسکرول افقی می‌سازند)
   ============================= */
body { overflow-x: hidden; }
html, body {
  background-color: #061a3a !important;
}