/**
 * ISLAMI COMICS - UPLOAD & PUBLISH COMIC CSS (css/upload.css)
 * Match Mockup 15 exactly
 */

:root {
  --bg-main: #f8faf9;
  --card-bg: #ffffff;
  --border-color: #e2dbca;
  --border-subtle: #eeebe1;
  --brand-green: #1a4332;
  --brand-green-hover: #133326;
  --brand-green-accent: #10b981;
  --brand-green-light: #eaf5ee;
  --brand-gold: #d4973b;
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
}

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

body {
  background-color: var(--bg-main);
  color: var(--text-dark);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 70px;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

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

/* ==========================================================================
   TOP HEADER NAVBAR
   ========================================================================== */
.upload-header {
  height: 60px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.upload-header-inner {
  width: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-home-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #f4f6f5;
  border: 1px solid var(--border-color);
  color: var(--text-dark);
  font-size: 12px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.btn-home-pill:hover {
  background: #e5eae7;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, #1a4332 0%, #0d281e 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.brand-text-wrap h1 {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.3px;
  color: var(--brand-green);
  line-height: 1.1;
}

.brand-text-wrap h1 span {
  color: var(--brand-gold);
}

.brand-tagline {
  font-size: 9.5px;
  color: var(--text-muted);
}

/* Header Center Search */
.header-center {
  flex: 1;
  max-width: 480px;
}

.search-input-wrapper {
  position: relative;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-subtle);
  font-size: 13px;
}

.search-input {
  width: 100%;
  height: 36px;
  background: #f4f6f5;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 0 16px 0 36px;
  color: var(--text-dark);
  font-size: 12px;
  outline: none;
  transition: all 0.2s ease;
}

.search-input:focus {
  background: #ffffff;
  border-color: var(--brand-green);
  box-shadow: 0 0 0 3px rgba(26, 67, 50, 0.1);
}

/* Header Right */
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.nav-link-btn:hover {
  color: var(--brand-green);
  background: #f4f6f5;
}

.btn-studio-header {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--brand-green-light);
  border: 1px solid #bbf7d0;
  color: #166534;
  font-size: 11.5px;
  font-weight: 800;
}

.notif-bell-btn {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fef3c7;
  color: #b45309;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.notif-badge-pill {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #ef4444;
  color: #fff;
  font-size: 8.5px;
  font-weight: 900;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

.user-profile-wrapper {
  position: relative;
}

.user-profile-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 4px;
}

.user-profile-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid var(--border-color);
}

.user-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dropdown-arrow-icon {
  font-size: 10px;
  color: var(--text-muted);
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 8px;
  display: none;
  flex-direction: column;
  z-index: 120;
}

.user-dropdown-menu.active {
  display: flex;
}

.dropdown-header-info {
  padding: 8px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 4px;
}

.dropdown-user-name {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-dark);
}

.dropdown-user-email {
  font-size: 10px;
  color: var(--text-muted);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--text-dark);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.dropdown-item:hover {
  background: #f4f6f5;
  color: var(--brand-green);
}

/* ==========================================================================
   TOP BAR: TITLE & 4-STEP WIZARD
   ========================================================================== */
.upload-top-bar-wrap {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 16px 24px;
}

.upload-top-bar-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.upload-main-title {
  font-size: 18px;
  font-weight: 900;
  color: var(--brand-green);
  letter-spacing: -0.3px;
}

.upload-main-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Stepper Indicator */
.upload-stepper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-subtle);
}

.step-item.active {
  color: var(--brand-green);
}

.step-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e2e8f0;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-item.active .step-circle {
  background: var(--brand-green);
  color: #fff;
}

.step-connector {
  width: 32px;
  height: 1.5px;
  background: #e2e8f0;
}

/* ==========================================================================
   MAIN 3-COLUMN WORKSPACE
   ========================================================================== */
.upload-main-layout {
  max-width: 1400px;
  width: 100%;
  margin: 20px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 260px 1fr 340px;
  gap: 20px;
  align-items: start;
}

/* Generic Box Card */
.upload-box-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.upload-box-card + .upload-box-card {
  margin-top: 16px;
}

.upload-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.box-head-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-dark);
}

.info-icon {
  font-size: 12px;
  color: var(--text-subtle);
  cursor: pointer;
}

/* ==========================================================================
   1. LEFT COLUMN: Cover & Tips
   ========================================================================== */
.upload-col-left {
  display: flex;
  flex-direction: column;
}

.cover-preview-wrapper {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: #111;
  box-shadow: var(--shadow-sm);
}

.cover-preview-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.btn-change-cover {
  width: 100%;
  height: 36px;
  margin-top: 10px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-dark);
  font-size: 11.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-change-cover:hover {
  background: #f4f6f5;
  border-color: var(--brand-green);
  color: var(--brand-green);
}

.cover-sub-hint {
  font-size: 10px;
  color: var(--text-subtle);
  text-align: center;
  margin-top: 6px;
}

.upload-tips-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tip-item {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.tip-item i {
  color: var(--brand-green-accent);
  font-size: 12px;
}

.upload-help-banner {
  background: #fbf5ea;
  border: 1px solid #fed7aa;
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: 16px;
}

.help-title {
  font-size: 12px;
  font-weight: 800;
  color: #9a3412;
}

.help-desc {
  font-size: 10.5px;
  color: #c2410c;
  margin: 3px 0 8px;
}

.btn-view-guide {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 800;
  color: #9a3412;
  text-decoration: underline;
}

/* ==========================================================================
   2. CENTER COLUMN: Forms & Settings
   ========================================================================== */
.upload-col-center {
  display: flex;
  flex-direction: column;
}

.form-group-block {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
}

.form-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.form-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dark);
}

.form-label .required {
  color: #ef4444;
}

.char-counter {
  font-size: 9.5px;
  color: var(--text-subtle);
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-dark);
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--brand-green);
  box-shadow: 0 0 0 3px rgba(26, 67, 50, 0.08);
}

.form-textarea {
  resize: vertical;
}

.form-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.custom-select-wrap {
  position: relative;
}

.custom-select-wrap select {
  appearance: none;
  padding-right: 26px;
  cursor: pointer;
}

.custom-select-wrap::after {
  content: '\f078';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 9px;
  color: var(--text-subtle);
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

/* Toggle Switch */
.toggle-switch-row {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
}

.switch-toggle {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 18px;
}

.switch-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-round {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #cbd5e1;
  transition: 0.3s;
  border-radius: 999px;
}

.slider-round::before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.switch-toggle input:checked + .slider-round {
  background-color: var(--brand-green-accent);
}

.switch-toggle input:checked + .slider-round::before {
  transform: translateX(16px);
}

.toggle-label-text {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-dark);
}

/* Pricing Option Cards */
.pricing-mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.pricing-option-card {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pricing-option-card.active {
  border-color: var(--brand-green-accent);
  background: #f0fdf4;
}

.pricing-option-card input[type="radio"] {
  display: none;
}

.radio-icon {
  color: var(--brand-green-accent);
  font-size: 12px;
  margin-right: 4px;
}

.pricing-opt-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-dark);
}

.pricing-opt-desc {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

.input-suffix-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-suffix-wrap input {
  padding-right: 28px;
}

.input-suffix {
  position: absolute;
  right: 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-subtle);
}

/* Tags Pill Container */
.tags-pill-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  min-height: 38px;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-dark);
}

.tag-pill button {
  color: var(--text-subtle);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.tag-pill button:hover {
  color: #ef4444;
}

.btn-add-tag-inline {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--brand-green);
  padding: 2px 6px;
}

/* ==========================================================================
   3. RIGHT COLUMN: Files & Sample Preview
   ========================================================================== */
.upload-col-right {
  display: flex;
  flex-direction: column;
}

.drop-zone-box {
  border: 1.5px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fbfdfc;
}

.drop-zone-box:hover {
  border-color: var(--brand-green-accent);
  background: #f0fdf4;
}

.drop-zone-icon {
  font-size: 28px;
  color: var(--brand-green-accent);
  margin-bottom: 8px;
}

.drop-zone-text {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-dark);
}

.drop-zone-sub {
  font-size: 10px;
  color: var(--text-subtle);
  margin: 4px 0;
}

.btn-choose-files {
  display: inline-block;
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  background: var(--brand-green);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  transition: all 0.2s ease;
}

.btn-choose-files:hover {
  background: var(--brand-green-hover);
}

.drop-zone-formats {
  font-size: 9.5px;
  color: var(--text-subtle);
  margin-top: 8px;
}

/* Uploaded File Badge */
.uploaded-file-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-top: 12px;
}

.file-badge-icon.pdf {
  width: 30px;
  height: 30px;
  border-radius: 4px;
  background: #fee2e2;
  color: #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.file-badge-info {
  flex: 1;
  min-width: 0;
}

.file-badge-name {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-badge-size {
  font-size: 9.5px;
  color: var(--text-muted);
}

.file-badge-check {
  color: var(--brand-green-accent);
  font-size: 16px;
}

.file-stats-summary-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.file-stat-cell {
  display: flex;
  flex-direction: column;
}

.fstat-label {
  font-size: 10px;
  color: var(--text-muted);
}

.fstat-val {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-dark);
  margin-top: 2px;
}

/* Sample Preview Interactive Box */
.sample-preview-stage {
  background: #111815;
  border-radius: var(--radius-sm);
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  position: relative;
}

.btn-preview-arrow {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  transition: all 0.2s;
}

.btn-preview-arrow:hover {
  background: var(--brand-green-accent);
}

.preview-spread-container {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.preview-page-left, .preview-page-right {
  aspect-ratio: 3 / 4;
  background: #222;
  border-radius: 3px;
  overflow: hidden;
}

.preview-page-left img, .preview-page-right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.preview-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.preview-tools-left {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-prev-tool {
  padding: 4px 6px;
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 11px;
  transition: all 0.2s;
}

.btn-prev-tool:hover {
  background: #e2e8f0;
  color: var(--text-dark);
}

.btn-prev-tool.active {
  color: var(--brand-green);
  font-weight: 800;
}

.preview-page-indicator {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-dark);
}

/* ==========================================================================
   STICKY BOTTOM FOOTER BAR
   ========================================================================== */
.upload-footer-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  z-index: 90;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.upload-footer-inner {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-review-notice {
  font-size: 11.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.learn-more-link {
  color: var(--brand-green);
  font-weight: 800;
}

.footer-actions-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-save-draft {
  height: 38px;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-dark);
  font-size: 12px;
  font-weight: 800;
  transition: all 0.2s ease;
}

.btn-save-draft:hover {
  background: #f4f6f5;
}

.btn-save-continue {
  height: 38px;
  padding: 0 22px;
  border-radius: var(--radius-sm);
  background: var(--brand-green);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(26, 67, 50, 0.25);
}

.btn-save-continue:hover {
  background: var(--brand-green-hover);
}

/* ==========================================================================
   MOBILE RESPONSIVE RULES
   ========================================================================== */
@media (max-width: 1024px) {
  .upload-main-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .upload-header-inner, .upload-top-bar-inner, .upload-main-layout, .upload-footer-inner {
    padding: 0 12px;
  }

  .header-center, .nav-link-btn, .btn-studio-header, .btn-home-pill {
    display: none;
  }

  .upload-stepper {
    display: none;
  }

  .form-grid-4 {
    grid-template-columns: 1fr 1fr;
  }

  .pricing-mode-grid {
    grid-template-columns: 1fr;
  }

  .footer-review-notice {
    display: none;
  }

  .upload-footer-inner {
    justify-content: flex-end;
  }
}
