/* ==========================================================================
   NAAT ACADEMY - KALAM SMART EDITOR & THEME DESIGN SYSTEM
   ========================================================================== */

:root {
  --primary: #059669;
  --primary-hover: #047857;
  --bg-main: #f1f5f9;
  --bg-card: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-light: #e2e8f0;
  --border-medium: #cbd5e1;
  --font-inter: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-urdu: 'Noto Nastaliq Urdu', serif;
}

/* Dark Mode Variables */
.dark, [data-theme="dark"] {
  --bg-main: #0f172a;
  --bg-card: #1e293b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-light: #334155;
  --border-medium: #475569;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-inter);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main.site-main {
  flex-grow: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

.urdu-font, .urdu-text {
  font-family: var(--font-urdu);
  line-height: 2.2;
}

.urdu-heading {
  font-family: var(--font-urdu);
  line-height: 1.8;
  font-weight: 700;
}

/* Smart Editor Compact Form Field Elements */
.field-group {
  position: relative;
  margin-bottom: 0.75rem;
}

.input-compact {
  width: 100%;
  font-size: 0.85rem;
  padding: 0.5rem 2.5rem 0.5rem 0.75rem;
  border: 1px solid var(--border-medium);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-main);
  transition: all 0.2s ease-in-out;
}

.input-compact:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
  outline: none;
}

.paste-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  cursor: pointer;
  z-index: 10;
  transition: all 0.15s ease;
}

.dark .paste-btn {
  background: #334155;
  border-color: #475569;
  color: #cbd5e1;
}

.paste-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.section-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border-light);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.label-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 3px;
  display: block;
}

.rtl-field .input-compact {
  padding: 0.5rem 0.75rem 0.5rem 2.5rem;
  text-align: right;
  direction: rtl;
}

.rtl-field .paste-btn {
  left: 8px;
  right: auto;
}

/* Highlight auto-filled fields */
.auto-filled {
  background-color: #f0fdf4 !important;
  border-color: #86efac !important;
  color: #064e3b !important;
}

.dark .auto-filled {
  background-color: #064e3b !important;
  border-color: #059669 !important;
  color: #ecfdf5 !important;
}

/* Container & Layout */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Buttons */
.btn-publish {
  background-color: var(--primary);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25);
  transition: all 0.2s ease;
}

.btn-publish:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

/* Toast */
#kalam-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  opacity: 0;
  transition: all 0.25s ease;
  z-index: 9999;
  background-color: #0f172a;
  color: #ffffff;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
}

#kalam-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
