/* =======================================================
   SIYAGHA UI COMPONENTS (siyagha-ui.css)
   Contains base resets, layout containers, and components (buttons, etc.)
   ======================================================= */

/* --- 1. Base Resets & Globals --- */
:root {
  --a4-width: 210mm;
  --a4-height: 297mm;
  --a5-width: 148mm;
  --a5-height: 210mm;
}

#pages-container {
  font-family: "Times New Roman", Times, serif;
}
.page {
  background: white;
  box-shadow: var(--shadow);
  position: relative;
  flex-shrink: 0;
  border-radius: 2px;
}
.page.a4.portrait {
  width: var(--a4-width);
  height: var(--a4-height);
}
.page.a4.landscape {
  width: var(--a4-height);
  height: var(--a4-width);
}
.page.a5.portrait {
  width: var(--a5-width);
  height: var(--a5-height);
}
.page.a5.landscape {
  width: var(--a5-height);
  height: var(--a5-width);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: var(--font-main);
  color: var(--text-main);
  line-height: 1.6;
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}

body::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  background-color: transparent;
}
input,
select,
textarea {
  font-family: inherit;
  border: none;
  outline: none;
}

/* ---
/* --- 2. Phosphor Icons Overrides --- */
.ph-duotone,
.ph-fill {
  color: var(--accent);
}

.ph-duotone.ph-white {
  color: white;
}

/* --- 3. Main Layout Containers --- */
.main-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  flex: 1;
  overflow: hidden;
}

.main-content {
  flex: 1;
  overflow-y: auto;
  margin-top: 80px;
}

/* Hide scrollbars for main scrolling areas */
.main-content,
.categories-scroll,
.carousel,
.store-scroll-area,
.preview-panel {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.main-content::-webkit-scrollbar,
.categories-scroll::-webkit-scrollbar,
.carousel::-webkit-scrollbar,
.store-scroll-area::-webkit-scrollbar,
.preview-panel::-webkit-scrollbar {
  display: none;
}

.sb-none {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* --- 4. Page Typography --- */
.page-title h1 {
  font-size: 1.5rem;
  margin-bottom: 5px;
}

.page-title p {
  color: var(--text-muted);
}

/* --- 5. Button Components --- */
.btn {
  padding: 10px 24px;
  border-radius: var(--radius-12);
  font-weight: 700;
  font-size: 1rem;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 20px;
}

.btn-primary {
  background: var(--gradient);
  color: white;
  border-radius: var(--radius-12);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
}

.btn-outline {
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
}

.btn-outline:hover {
  background-color: var(--accent-soft);
}

.btn-secondary {
  color: var(--text-muted);
}

.btn-secondary:hover {
  color: var(--accent);
}

.outlined-round {
  border: 1px solid var(--border);
  border-radius: 25px;
  padding: 5px 16px;
}

.outlined-round:hover {
  border-color: var(--accent);
}

.btn.wide {
  width: 100%;
}

.btn i {
  font-size: 1.5rem;
}

.btn-sm {
  padding: 6px 16px;
  font-size: 0.9rem;
}

.avatar {
  width: 40px;
  height: 40px;
}

.icon-btn-sm {
  width: 36px;
  height: 36px;
}
.nav-item i {
  font-size: 2rem;
}

.nav-item:hover {
  background-color: var(--bg-body);
  color: var(--text-main);
}

.nav-item.active {
  background-color: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}
.cursor-pointer {
  cursor: pointer;
}

#user-dropdown {
  top: 84px;
  width: 200px;
  min-width: 200px;
  z-index: 1000;
}

/* --- 9. State Utilities --- */
.transition-all {
  transition: all 0.2s ease-in-out;
}

.default-cover {
  background: var(--gradient);
}

.hover-shadow:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.template-card {
  width: 220px;
  aspect-ratio: 0.75;
}
.procedural-thumb {
  background-repeat: no-repeat;
  background-position: center top 15%;
  background-size: 80%;
}
.pill.active {
  color: var(--white);
  background-color: var(--accent);
}
.pill.active i {
  color: var(--white);
}

/* =======================================================
   Main Header (Fixed Position)
   ======================================================= */
#main-header {
  height: 80px;
}

.main-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto; /* This centers the content on large screens */
  padding: 0 1rem; /* Horizontal padding for smaller screens */
}

#merge-modal {
  top: 104px;
  height: calc(100vh - 104px);
  overflow-y: auto;
  scrollbar-width: none;
}
.toolbar {
  height: 50px;
}

.billboard {
  height: 360px;
}
.billboard .billboard-img {
  background-image: url("../images/svg/promote.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
.dynamic-grid-200 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  padding: 1rem;
}
.dynamic-grid-250 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  padding: 1rem;
}
.dynamic-grid-300 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  padding: 1rem;
}
.dynamic-grid-350 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
  padding: 1rem;
}
.dynamic-grid-400 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 20px;
  padding: 1rem;
}
.toast-container {
  width: fit-content;
  bottom: 20px;
  right: calc(50vw - 150px);
}

.marquee-track {
  animation: scroll-marquee-rtl 30s linear infinite;
}

.marquee-wrapper:hover .marquee-track {
  animation-play-state: paused;
}

/* =======================================================
   Auth Pages (Login / Register)
   ======================================================= */
.auth-form-side {
  width: 50%;
}
.auth-preview-side {
  width: 50%;
}
.auth-form-inner {
  width: 75%;
  margin: auto;
}
