/* Shared themes for AZIU pages.
   Usage:
   <link rel="stylesheet" href="themes.css" />
*/

/* ===== Base theme classes ===== */
body {
  transition: background 0.4s, color 0.4s;
}

/* ===== Shared top navbar (used across pages) ===== */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 30px;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  background: rgba(255, 255, 255, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 30px;
  min-width: 0;
}

.nav-logo {
  height: 120px;
  width: auto;
  object-fit: contain;
}

.nav-menu {
  display: flex;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.nav-menu li a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  font-size: 15px;
  transition: color 0.3s;
}

.nav-menu li a:hover {
  color: var(--primary, #007bff);
  text-decoration: underline;
}

.nav-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.styled-select {
  appearance: none;
  padding: 8px 35px 8px 15px;
  background-color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  background-image: url('data:image/svg+xml;utf8,<svg fill="%23333" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 8px center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
  transition: all 0.3s;
}

.styled-select:focus {
  outline: none;
  border-color: var(--primary, #007bff);
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

@media (max-width: 768px) {
  .top-nav { padding: 10px 15px; }
  .nav-menu { display: none; }
  .nav-logo { height: 52px; }
}

/* Footer dizayni (same as index.html) */
.site-footer {
  text-align: center;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  margin-top: 50px;
  color: #777;
  font-size: 16px;
  transition: all 0.3s;
}

.site-footer span { margin-bottom: 0px; }

body.dark .site-footer { color: #aaa; }

body.animated .site-footer {
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.footer-logo {
  height: 180px;
  vertical-align: middle;
  object-fit: contain;
}

/* Inline SVG logo coloring by theme (same as index.html) */
.nav-logo,
.footer-logo {
  display: inline-block;
  flex: 0 0 auto;
  user-select: none;
}

.nav-logo path,
.footer-logo path {
  fill: currentColor !important;
  stroke: currentColor !important;
}

.nav-logo path[fill="none"],
.footer-logo path[fill="none"] {
  fill: none !important;
  stroke: none !important;
}

/* Ensure <svg> itself uses theme color as currentColor */
.nav-logo,
.footer-logo {
  fill: currentColor;
  stroke: currentColor;
}

.bright {
  --primary: #6d5dfc;
  background: #fff;
  color: #000;
}

.dark {
  --primary: #8abdff;
  background: #121212;
  color: #fff;
}

.animated {
  --primary: #ffffff;
  animation: gradientShift 50s ease infinite;
  background: linear-gradient(-45deg, #ff9966, #ff5e62, #36d1dc, #00b09b, #8e2de2, #fceabb, #ff6ec4, #7873f5);
  background-size: 5000% 5000%;
  color: #fff;
}

@keyframes gradientShift {
  0% { background-position: 0% 50% }
  50% { background-position: 100% 50% }
  100% { background-position: 0% 50% }
}

/* Animated theme transparency helpers */
body.animated #searchTerm,
body.animated .richtexteditor {
  background: rgba(255, 255, 255, 0.4) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #000 !important;
}

body.animated .editor-wrapper,
body.animated rte-content,
body.animated .rte-commandpanel,
body.animated .rte-dialog-content,
body.animated rte-toolbar,
body.animated .rte-edit-container,
body.animated .rte-bottom {
  background: transparent !important;
  border: none !important;
}

body.animated .editor-wrapper iframe,
body.animated .richtexteditor iframe {
  background: transparent !important;
  background-color: transparent !important;
}

/* Dark theme helpers */
body.dark .top-nav {
  background: rgba(20, 20, 20, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark .nav-menu li a { color: #eee; }

body.dark .styled-select {
  background-color: rgba(30, 30, 30, 0.8);
  color: #eee;
  border-color: rgba(255, 255, 255, 0.1);
  background-image: url('data:image/svg+xml;utf8,<svg fill="%23eee" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
}

body.dark #searchTerm,
body.dark .status-bar {
  background: #1a1a1a !important;
  color: #fff !important;
  border-color: #333 !important;
}

/* ===== Shared buttons (normalize across pages) ===== */
button,
.btn,
input[type="button"] {
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.2s, color 0.2s;
}

body.aziu_soft button,
body.aziu_soft .btn,
body.aziu_soft input[type="button"] {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 24px rgba(109, 93, 252, 0.25);
}

body.aziu_soft button:hover,
body.aziu_soft .btn:hover,
body.aziu_soft input[type="button"]:hover {
  transform: translateY(-1px);
}

body.custom button,
body.custom .btn,
body.custom input[type="button"] {
  background: var(--custom-text, #111111);
  color: var(--custom-bg, #ffffff);
}

/* ===== AZIU theme ===== */
body.aziu_soft {
  --primary-light: #8abdff;
  --primary: #6d5dfc;
  --primary-dark: #5b0eeb;
  --greyLight-1: #E4EBF5;
  --greyLight-2: #c8d0e7;
  --greyLight-3: #bec8e4;
  --greyDark: #9baacf;
  --white: #FFFFFF;
  background: var(--greyLight-1);
  color: var(--greyDark);
}

body.aziu_soft .container,
body.aziu_soft .top-nav {
  background: var(--greyLight-1);
  box-shadow: 0.8rem 0.8rem 1.4rem var(--greyLight-2), -0.2rem -0.2rem 1.8rem var(--white);
  border: none;
}

body.aziu_soft .container { border-radius: 3rem; }

body.aziu_soft .editor-wrapper,
body.aziu_soft #searchTerm {
  background: var(--greyLight-1) !important;
  box-shadow: inset 0.2rem 0.2rem 0.5rem var(--greyLight-2), inset -0.2rem -0.2rem 0.5rem var(--white) !important;
  border: none !important;
  border-radius: 1rem;
}

body.aziu_soft h1,
body.aziu_soft label,
body.aziu_soft .status-bar,
body.aziu_soft .nav-menu li a {
  color: var(--primary);
}

body.aziu_soft .site-footer {
  color: var(--greyDark);
  font-weight: 500;
}

/* AZIU theme color picker */
.aziu-theme-controls {
  display: none;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.aziu-theme-controls label {
  font-size: 12px;
  opacity: 0.85;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  color: var(--primary);
}
.aziu-theme-controls input[type="color"] {
  width: 34px;
  height: 28px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}
body.aziu_soft .aziu-theme-controls { display: flex; }

/* ===== Custom theme ===== */
body.custom {
  background: var(--custom-bg, #ffffff);
  color: var(--custom-text, #111111);
}

body.custom .top-nav,
body.custom .container,
body.custom .mode-switch,
body.custom .segmented-control,
body.custom .editor-wrapper,
body.custom .status-bar,
body.custom .stats-dashboard,
body.custom .stats-section,
body.custom .stats-item {
  background: var(--custom-bg, #ffffff) !important;
  box-shadow: none !important;
}

body.custom .segmented-control label,
body.custom .modern-toggle,
body.custom .status-bar label,
body.custom .stats-report-btn,
body.custom .stats-section h3,
body.custom .site-footer span,
body.custom small,
body.custom .stat-label {
  color: var(--custom-text-2, #666666) !important;
}

body.custom .segmented-control label:has(input:checked) {
  background: var(--custom-text, #111111) !important;
  color: var(--custom-bg, #ffffff) !important;
  box-shadow: none !important;
}

body.custom .stats-report-btn {
  background: var(--custom-text, #111111) !important;
  color: var(--custom-bg, #ffffff) !important;
}

body.custom input:checked + .switch-bg {
  background-color: var(--custom-text-2, #666666) !important;
}
body.custom input:checked + .switch-bg:before {
  background-color: var(--custom-bg, #ffffff) !important;
}

/* Custom theme controls */
.custom-theme-controls {
  display: none;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.custom-theme-controls label {
  font-size: 12px;
  opacity: 0.85;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.custom-theme-controls input[type="color"] {
  width: 34px;
  height: 28px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}
body.custom .custom-theme-controls { display: flex; }

/* ===== Logo coloring (inline SVG uses currentColor) ===== */
body.bright .nav-logo,
body.bright .footer-logo { color: #000000; }
body.dark .nav-logo,
body.dark .footer-logo { color: #ffffff; }
body.aziu_soft .nav-logo,
body.aziu_soft .footer-logo { color: var(--primary); }
body.animated .nav-logo,
body.animated .footer-logo { color: #333333; }
body.custom .nav-logo,
body.custom .footer-logo { color: var(--custom-text, #111111); }

