/* =========================================
   EZGU - Converter Core Styles (style.css)
   ========================================= */

/* =============================
   1) 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);
}

/* =============================
   2) Base Layout
   ============================= */
* { box-sizing: border-box; }

body {
  font-family: var(--ui-font);
  background-color: var(--bg-color) !important;
  margin: 0;
  color: var(--text-color);
  overflow-x: hidden;
}

.main-wrapper {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--panel-bg);
}

/* =============================
   3) Converter Layout (Lotin/Arab)
   ============================= */
.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;
}

/* =============================
   4) Column Header & Glassmorphism
   ============================= */
.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;
  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;
}

/* =============================
   5) Textareas (Input/Output)
   ============================= */
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: all 0.2s;
  background: #ffffff;
  color: #222;
  box-shadow: var(--shadow-soft);
}

#latinInput { font-family: system-ui, sans-serif; }
#arabicOutput {
  font-family: var(--arabic-text-font);
  font-size: 15px;
}

textarea:focus {
  border-color: var(--btn-color);
  box-shadow: var(--shadow-strong);
}

/* =============================
   6) Buttons (Ezgu Gold Style)
   ============================= */
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;
  box-shadow: 0 6px 14px rgba(0,0,0,0.22);
  transition: all 0.15s ease;
  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);
}

.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);
}

.btn-word-link button:hover {
  background-color: var(--btn-color);
  color: #000;
}

/* =============================
   7) Processing Overlay
   ============================= */
.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;
}

.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 { 100% { transform: rotate(360deg); } }

/* =============================
   8) Responsive Fixes
   ============================= */
@media (max-width: 820px) {
  .converter-container { flex-direction: column; }
  .column-header { flex-wrap: wrap; }
  
  #latinInput, #arabicOutput {
    border-radius: var(--radius-lg);
    height: 250px;
    font-size: 16px;
  }
  
  .btn-convert, .btn-copy {
    width: 100%;
    font-size: 15px;
  }
}