/* Podania — edytor w stylu dokumentu */

.podania-page .app { opacity: 1; }

.podania-main {
  display: grid;
  grid-template-columns: 300px 1fr;
  min-height: 100vh;
  padding-top: var(--header-h);
}

.podania-sidebar {
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.25rem;
  background: rgba(0, 0, 0, 0.35);
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  overflow-y: auto;
}

.podania-sidebar__back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-dim);
  margin-bottom: 1rem;
  transition: color 0.2s;
}

.podania-sidebar__back:hover { color: var(--text); }

.podania-sidebar__head h1 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.35rem;
}

.podania-sidebar__head p {
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

.podania-types {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.podania-type {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.75rem 0.85rem;
  background: transparent;
  border: none;
  border-radius: 10px;
  font-family: var(--font);
  color: var(--text-muted);
  text-align: left;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.podania-type i {
  width: 1.25rem;
  text-align: center;
  color: var(--accent-light);
  opacity: 0.8;
}

.podania-type span {
  font-size: 0.82rem;
  font-weight: 600;
}

.podania-type__status {
  font-size: 0.55rem;
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
}

.podania-type__status--open {
  color: var(--green);
  background: rgba(34, 197, 94, 0.12);
}

.podania-type__status--closed {
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.06);
}

.podania-type:hover:not(.is-disabled):not(.is-cooldown) {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.podania-type.is-active {
  background: rgba(193, 22, 123, 0.15);
  color: var(--text);
}

.podania-type.is-active.is-cooldown {
  background: transparent;
  color: var(--text-muted);
}

.podania-type.is-disabled,
.podania-type.is-cooldown {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.podania-type.is-cooldown {
  opacity: 0.55;
}

.podania-type.is-cooldown i {
  color: #fbbf24;
  opacity: 1;
}

.podania-type__status--cooldown {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
  white-space: nowrap;
}

.podania-type.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.podania-sidebar__auth {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.podania-sidebar__auth .auth-panel {
  padding: 0;
  background: transparent;
  box-shadow: none;
  text-align: left;
}

.podania-sidebar__auth .auth-panel__title { font-size: 0.9rem; }
.podania-sidebar__auth .auth-panel__text { font-size: 0.78rem; margin-bottom: 0.75rem; }

/* Workspace */
.podania-workspace {
  position: relative;
  padding: 1.5rem clamp(1rem, 3vw, 2.5rem) 2.5rem;
  background: #0e0e10;
  min-height: calc(100vh - var(--header-h));
}

.podania-confirm {
  overflow: hidden;
}

body.podania-page--confirm-open {
  overflow: hidden;
}

body.podania-page--confirm-open .podania-main,
body.podania-page--confirm-open .podania-sidebar,
body.podania-page--confirm-open .podania-workspace {
  overflow: hidden;
}

.podania-gate,
.podania-success,
.podania-confirm,
.podania-welcome {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(6, 6, 6, 0.88);
  backdrop-filter: blur(8px);
}

.podania-welcome {
  z-index: 1;
  background: #0e0e10;
  backdrop-filter: none;
}

.podania-gate[hidden],
.podania-success[hidden],
.podania-confirm[hidden],
.podania-welcome[hidden] {
  display: none !important;
}

.podania-gate__box,
.podania-success__box,
.podania-confirm__box,
.podania-welcome__box {
  max-width: 440px;
  text-align: center;
  padding: 2rem;
}

.podania-gate__box i,
.podania-success__box i,
.podania-confirm__box i,
.podania-welcome__box i {
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.podania-confirm__box i {
  color: #fbbf24;
}

.podania-welcome__box i {
  opacity: 0.85;
}

.podania-success__box i { color: var(--green); }

.podania-gate__box h2,
.podania-success__box h2,
.podania-confirm__box h2,
.podania-welcome__box h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.podania-gate__box p,
.podania-success__box p,
.podania-confirm__box p,
.podania-welcome__box p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.podania-confirm__actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
}

.podania-confirm__actions .btn {
  justify-content: center;
}

.podania-success__channel {
  display: block;
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
  color: var(--accent-light);
  padding: 0.65rem 1rem;
  background: rgba(193, 22, 123, 0.1);
  border-radius: 8px;
  margin-bottom: 0.75rem;
}

.podania-success__hint {
  font-size: 0.78rem !important;
  margin-bottom: 1.25rem !important;
}

/* Google Docs–style editor */
.doc-editor {
  max-width: 820px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--header-h) - 3rem);
}

.doc-editor.is-locked {
  opacity: 0.35;
  pointer-events: none;
  user-select: none;
}

.doc-editor__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 1rem;
  background: #1a1a1d;
  border-radius: 10px 10px 0 0;
  flex-wrap: wrap;
}

.doc-editor__toolbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.doc-editor__badge {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-light);
}

.doc-editor__autosave {
  font-size: 0.65rem;
  color: var(--text-dim);
}

.doc-editor__autosave.is-saving { color: var(--accent); }

.doc-editor__author {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.doc-editor__paper {
  flex: 1;
  background: #f9fafb;
  color: #111827;
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1.75rem, 4vw, 3rem);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
  min-height: 520px;
}

.doc-editor__title {
  width: 100%;
  font-family: var(--font);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: #111827;
  background: transparent;
  border: none;
  border-bottom: 1px solid #e5e7eb;
  padding: 0 0 0.75rem;
  margin-bottom: 2rem;
  outline: none;
}

.doc-editor__title::placeholder { color: #9ca3af; }

.doc-editor__title.is-error {
  border-bottom-color: #dc2626;
  background: rgba(220, 38, 38, 0.04);
}

.doc-field__req {
  color: #dc2626;
  font-weight: 700;
}

.doc-field.is-error .doc-field__label {
  color: #dc2626;
}

.doc-field.is-error .doc-field__input,
.doc-field.is-error .doc-field__textarea,
.doc-field.is-error .doc-field__select,
.doc-field__input.is-error,
.doc-field__textarea.is-error,
.doc-field__select.is-error {
  border-bottom-color: #dc2626 !important;
  background: rgba(220, 38, 38, 0.04);
  border-radius: 4px;
}

.doc-field__error {
  font-size: 0.72rem;
  font-weight: 500;
  color: #dc2626;
  margin-top: 0.4rem;
}

.doc-field {
  margin-bottom: 1.75rem;
}

.doc-field__label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 0.5rem;
}

.doc-field__input,
.doc-field__textarea,
.doc-field__select {
  width: 100%;
  font-family: var(--font);
  font-size: 0.95rem;
  line-height: 1.7;
  color: #1f2937;
  background: transparent;
  border: none;
  outline: none;
  resize: vertical;
}

.doc-field__input {
  padding: 0.35rem 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.doc-field__input:focus {
  border-bottom-color: #d1d5db;
}

.doc-field__input--url {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.82rem;
  word-break: break-all;
}

.doc-field__textarea {
  min-height: 140px;
  padding: 0.5rem 0;
}

.doc-field__textarea--lg { min-height: 220px; }

.doc-field__select {
  padding: 0.5rem 0;
  border-bottom: 1px solid #e5e7eb;
  cursor: pointer;
  resize: none;
}

.doc-field__select:focus {
  border-bottom-color: #d1d5db;
}

.doc-field__hint {
  font-size: 0.72rem;
  color: #9ca3af;
  margin-top: 0.35rem;
}

.doc-field--section {
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  padding-top: 0.5rem;
  border-top: 1px solid #e5e7eb;
}

.doc-field--section:first-child {
  border-top: none;
  padding-top: 0;
}

.doc-field__section {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #374151;
}

.doc-field--hint {
  margin-bottom: 1.25rem;
}

.doc-field__hint-box {
  padding: 0.85rem 1rem;
  font-size: 0.82rem;
  line-height: 1.6;
  color: #4b5563;
  background: #f3f4f6;
  border-left: 3px solid var(--accent, #c1167b);
  border-radius: 0 8px 8px 0;
}

.doc-field__example {
  display: inline-block;
  margin-top: 0.35rem;
  font-weight: 600;
  color: var(--accent, #c1167b);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.doc-field__example:hover {
  color: #9d125f;
}

.doc-editor__footer {
  padding: 1.25rem 1rem;
  background: #1a1a1d;
  border-radius: 0 0 10px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.doc-editor__note {
  font-size: 0.78rem;
  color: var(--text-dim);
  max-width: 420px;
  line-height: 1.55;
}

.doc-editor__note strong {
  color: var(--text-muted);
  font-weight: 600;
}

.podania-cooldown {
  width: 100%;
  max-width: 520px;
  padding: 0.85rem 1rem;
  font-size: 0.82rem;
  line-height: 1.55;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 10px;
}

.podania-cooldown i {
  margin-right: 0.35rem;
}

.doc-editor.is-cooldown .doc-editor__paper {
  opacity: 0.72;
}

#podania-submit.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

#podania-submit {
  min-width: 220px;
}

#podania-submit.is-loading {
  opacity: 0.7;
  pointer-events: none;
}

/* Podanie na Set — tło ze zdjęcia */
.doc-editor--set {
  max-width: 900px;
}

.doc-editor--set .doc-editor__paper {
  position: relative;
  background:
    linear-gradient(180deg, rgba(10, 6, 22, 0.78) 0%, rgba(14, 8, 28, 0.88) 100%),
    url("assets/podanie-set-bg.png") center center / cover no-repeat;
  color: #f3f4f6;
}

.doc-editor--set .doc-editor__title {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.2);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.doc-editor--set .doc-editor__title::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.doc-editor--set .doc-field__label {
  color: rgba(255, 255, 255, 0.72);
}

.doc-editor--set .doc-field__input,
.doc-editor--set .doc-field__textarea,
.doc-editor--set .doc-field__select {
  color: #f9fafb;
}

.doc-editor--set .doc-field__input::placeholder,
.doc-editor--set .doc-field__textarea::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.doc-editor--set .doc-field__input:focus,
.doc-editor--set .doc-field__textarea:focus {
  border-bottom-color: rgba(193, 22, 123, 0.65);
}

.doc-editor--set .doc-field__input--url {
  color: #e9d5ff;
}

.doc-editor--set .doc-field__hint {
  color: rgba(255, 255, 255, 0.55);
}

.doc-editor--set .doc-field__hint-box {
  background: rgba(0, 0, 0, 0.35);
  color: rgba(255, 255, 255, 0.88);
  border-left-color: var(--accent, #c1167b);
  backdrop-filter: blur(6px);
}

.doc-editor--set .doc-field__example {
  color: #f9a8d4;
}

.doc-editor--set .doc-field__example:hover {
  color: #fbcfe8;
}

.doc-editor--set .doc-field--section {
  border-top-color: rgba(255, 255, 255, 0.15);
}

.doc-editor--set .doc-field__section {
  color: #e5e7eb;
}

.doc-editor--set .doc-field.is-error .doc-field__input,
.doc-editor--set .doc-field.is-error .doc-field__textarea {
  background: rgba(220, 38, 38, 0.15);
}

@media (max-width: 900px) {
  .podania-main { grid-template-columns: 1fr; }

  .podania-sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  }

  .podania-types {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 0.25rem;
  }

  .podania-type {
    flex-shrink: 0;
    min-width: 200px;
    grid-template-columns: auto 1fr;
  }

  .podania-type__status { display: none; }
}
