/**
 * 게시글 작성 페이지 스타일
 */

/* ===== Base ===== */
body.pc-page {
  background: #f9fafb;
  font-family: 'Noto Sans KR', sans-serif;
  min-height: 100vh;
}

/* ===== Header ===== */
.pc-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: #fff;
  border-bottom: 1px solid #f3f4f6;
  z-index: 100;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
}

.pc-header-inner {
  max-width: 820px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.pc-back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
  min-width: 80px;
}

.pc-back-btn:hover {
  background: #f3f4f6;
  color: #f97316;
}

.pc-back-btn i {
  font-size: 18px;
}

.pc-header-center {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  color: #111827;
}

.pc-header-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f97316, #ec4899);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  flex-shrink: 0;
}

.pc-header-title-text {
  font-size: 17px;
  font-weight: 700;
  color: #111827;
}

.pc-header-right {
  min-width: 80px;
}

/* ===== Main ===== */
.pc-main {
  max-width: 768px;
  margin: 0 auto;
  padding: 84px 16px 104px;
}

/* ===== Error ===== */
.pc-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 500;
}

/* ===== Title Input ===== */
.pc-title-wrap {
  margin-bottom: 16px;
}

.pc-title-input {
  width: 100%;
  font-size: 26px;
  font-weight: 700;
  color: #111827;
  border: none;
  border-bottom: 2px solid #e5e7eb;
  padding: 12px 0;
  background: transparent;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.pc-title-input::placeholder {
  color: #9ca3af;
  font-weight: 400;
}

.pc-title-input:focus {
  border-bottom-color: #f97316;
}

/* ===== Section Cards ===== */
.pc-section-card {
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  border: 1px solid #f3f4f6;
}

.pc-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.pc-section-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  flex-shrink: 0;
}

.pc-icon-orange { background: linear-gradient(135deg, #f97316, #fb923c); }
.pc-icon-blue   { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
.pc-icon-yellow { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.pc-icon-green  { background: linear-gradient(135deg, #22c55e, #4ade80); }
.pc-icon-purple { background: linear-gradient(135deg, #8b5cf6, #a78bfa); }
.pc-icon-pink   { background: linear-gradient(135deg, #ec4899, #f472b6); }

.pc-section-title {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  flex: 1;
}

.pc-section-hint {
  font-size: 12px;
  color: #9ca3af;
  font-weight: 400;
}

/* ===== Info Grid ===== */
.pc-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.pc-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.pc-form-full {
  grid-column: 1 / -1;
}

.pc-label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pc-input,
.pc-select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  color: #1f2937;
  background: #f9fafb;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  box-sizing: border-box;
}

.pc-input:focus,
.pc-select:focus {
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
  background: #fff;
}

/* Address wrap with search icon */
.pc-address-wrap {
  position: relative;
}

.pc-input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 16px;
  pointer-events: none;
  z-index: 1;
}

.pc-input-with-icon {
  padding-left: 38px;
}

/* ===== Place Results Dropdown ===== */
.place-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 200;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.place-result-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.15s;
}

.place-result-item:last-child {
  border-bottom: none;
}

.place-result-item:hover {
  background: #fff7ed;
}

.place-result-name {
  font-weight: 600;
  color: #1f2937;
  font-size: 14px;
  margin-bottom: 2px;
}

.place-result-address {
  font-size: 12px;
  color: #6b7280;
}

.place-result-meta {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 2px;
}

/* ===== Map ===== */
.pc-map {
  width: 100%;
  height: 260px;
  border-radius: 12px;
  border: 1.5px solid #e5e7eb;
  background: #f3f4f6;
  overflow: hidden;
}

/* ===== Rating ===== */
.pc-rating-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.pc-rating-stars-lg {
  display: flex;
  gap: 6px;
}

.pc-rating-stars-lg .star {
  font-size: 36px;
  cursor: pointer;
  transition: transform 0.1s, color 0.1s;
  color: #d1d5db;
  line-height: 1;
  position: relative;
  display: inline-block;
}

.pc-rating-stars-lg .star:hover,
.pc-rating-stars-lg .star.full {
  color: #f59e0b;
}

.pc-rating-stars-lg .star:hover {
  transform: scale(1.15);
}

.pc-rating-stars-lg .star.half {
  color: #d1d5db;
}

.pc-rating-stars-lg .star.half::before {
  content: '★';
  position: absolute;
  left: 0;
  top: 0;
  width: 50%;
  overflow: hidden;
  color: #f59e0b;
}

.pc-rating-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pc-rating-input {
  width: 72px;
  padding: 8px 10px;
  border: 1.5px solid #fde68a;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 600;
  color: #d97706;
  text-align: center;
  background: #fffbeb;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.pc-rating-input:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.pc-rating-max {
  font-size: 14px;
  color: #9ca3af;
  font-weight: 500;
}

/* ===== Image Upload ===== */
.pc-camera-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: #f3f4f6;
  border: 1.5px dashed #d1d5db;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  font-family: inherit;
  margin-bottom: 16px;
}

.pc-camera-btn:hover {
  background: #fff7ed;
  border-color: #f97316;
  color: #f97316;
}

.pc-camera-btn i {
  font-size: 20px;
}

/* Image preview grid (generated by JS) */
.image-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
}

.image-preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.image-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  transition: background 0.15s;
}

.image-preview-remove:hover {
  background: rgba(220, 38, 38, 0.85);
}

/* ===== Content Textarea ===== */
.pc-textarea {
  width: 100%;
  padding: 14px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-size: 15px;
  color: #1f2937;
  background: #f9fafb;
  font-family: inherit;
  resize: vertical;
  outline: none;
  line-height: 1.7;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  min-height: 180px;
}

.pc-textarea:focus {
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
  background: #fff;
}

.pc-count {
  text-align: right;
  font-size: 12px;
  color: #9ca3af;
  margin-top: 6px;
}

/* ===== Tags ===== */
.pc-tag-area {
  position: relative;
}

.pc-tag-input-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  background: #f9fafb;
  min-height: 46px;
  cursor: text;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.pc-tag-input-wrap:focus-within {
  border-color: #f97316;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}

.pc-tag-list {
  display: contents;
}

.pc-tag-input {
  flex: 1;
  min-width: 120px;
  border: none;
  background: transparent;
  font-size: 14px;
  color: #1f2937;
  outline: none;
  font-family: inherit;
}

.pc-tag-input::placeholder {
  color: #9ca3af;
}

/* Tag chips (rendered by JS renderTags()) */
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #fff7ed, #fef3c7);
  border: 1px solid #fed7aa;
  color: #c2410c;
  font-size: 13px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.tag-remove {
  background: none;
  border: none;
  color: #c2410c;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0;
  font-weight: bold;
  transition: color 0.15s;
}

.tag-remove:hover {
  color: #dc2626;
}

/* Tag suggestions dropdown (from API search, rendered by JS) */
.pc-tag-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 200;
  overflow: hidden;
}

.tag-suggestion-item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
  color: #374151;
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.1s, color 0.1s;
}

.tag-suggestion-item:last-child {
  border-bottom: none;
}

.tag-suggestion-item:hover {
  background: #fff7ed;
  color: #f97316;
}

/* ===== Bottom Fixed Bar ===== */
.pc-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 72px;
  background: #fff;
  border-top: 1px solid #f3f4f6;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.07);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.pc-bottom-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pc-bottom-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
}

.pc-bottom-badge i {
  font-size: 16px;
}

.pc-bottom-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pc-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: linear-gradient(135deg, #f97316, #ec4899);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s, transform 0.1s;
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.3);
}

.pc-submit-btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.pc-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .pc-info-grid {
    grid-template-columns: 1fr;
  }

  .pc-form-full {
    grid-column: auto;
  }

  .pc-main {
    padding: 80px 12px 96px;
  }

  .pc-title-input {
    font-size: 22px;
  }

  .pc-rating-stars-lg .star {
    font-size: 28px;
  }

  .pc-bottom-bar {
    height: 64px;
    padding: 0 12px;
  }

  .pc-submit-btn {
    padding: 10px 20px;
    font-size: 14px;
  }

  .pc-section-card {
    padding: 18px 16px;
  }

  .pc-header-title-text {
    font-size: 15px;
  }
}
