/* Basic Theme Styles */

ul{
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Input 하이라이트 제거 - 모든 상태에서 강제 제거 */
input,
input:focus,
input:active,
input:hover,
input:focus-visible,
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  outline: none !important;
  box-shadow: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

textarea,
textarea:focus,
textarea:active,
textarea:hover,
textarea:focus-visible {
  outline: none !important;
  box-shadow: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

select,
select:focus,
select:active,
select:hover,
select:focus-visible {
  outline: none !important;
  box-shadow: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

/* iOS Safari에서 input 포커스 시 나타나는 테두리 제거 */
input:focus,
textarea:focus,
select:focus {
  -webkit-tap-highlight-color: transparent !important;
  -webkit-focus-ring-color: transparent !important;
}

/* Layout */
.site-logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.site-logo-img {
  max-height: 40px;
  margin-right: 8px;
}

.menu-dropdown {
  position: relative;
  display: inline-block;
}

.menu-dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 8px 0;
  min-width: 150px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: none;
  z-index: 1000;
}

.menu-dropdown:hover .menu-dropdown-content {
  display: block !important;
}

.menu-dropdown-item {
  padding: 6px 16px;
}

.menu-dropdown-item a {
  text-decoration: none;
  color: #333;
  display: block;
}

.menu-dropdown-content a:hover {
  background-color: #f5f5f5;
}

.logout-link {
  cursor: pointer;
}

/* Blog View */
.post-meta {
  color: #999;
}

.post-meta-separator {
  color: #ccc;
  margin: 0 8px;
}

.post-views {
  color: #666;
  margin-left: 12px;
}

.post-tags {
  margin: 16px 0;
}

.tag-link {
  display: inline-block;
  margin: 4px 8px 4px 0;
  padding: 4px 12px;
  background: #f0f0f0;
  border-radius: 12px;
  text-decoration: none;
  color: #006fff;
  font-size: 14px;
}

.tag-link-small {
  display: inline-block;
  margin-right: 4px;
  padding: 2px 8px;
  background: #f0f0f0;
  border-radius: 10px;
  text-decoration: none;
  color: #006fff;
  font-size: 12px;
}

.attachments-container {
  margin: 24px 0;
  padding: 16px;
  background: #f5f5f5;
  border-radius: 8px;
}

.attachments-title {
  display: block;
  margin-bottom: 12px;
  color: #333;
}

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

.attachment-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: white;
  border-radius: 6px;
  text-decoration: none;
  color: #333;
  transition: background 0.2s;
}

.attachment-item:hover {
  background: #f0f0f0;
}

.attachment-icon {
  font-size: 24px;
  color: #666;
}

.attachment-info {
  flex: 1;
}

.attachment-filename {
  font-weight: 500;
  color: #333;
}

.attachment-size {
  font-size: 12px;
  color: #999;
}

.attachment-download-icon {
  font-size: 18px;
  color: #006fff;
}

/* Board View */
.board-link {
  color: #999;
  text-decoration: none;
}

.author-name {
  color: #666;
}

/* Blog List */
.category-path {
  color: #999;
  margin-left: 8px;
}

.post-date {
  color: #666;
  margin-left: 8px;
}

.full-width{
  width: 100% !important;
}

/* Forms */
.form-container {
  width: 400px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 16px;
}

.form-group-large {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 4px;
  font-weight: 500;
}

.form-label-large {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
}

.form-input:disabled {
  background: #f5f5f5;
}

.form-small {
  color: #666;
  display: block;
  margin-top: 4px;
}

.form-button {
  width: 100%;
  padding: 12px;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}

.form-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-button-group {
  display: flex;
  gap: 12px;
}

.form-button-secondary {
  flex: 1;
  padding: 12px;
  background: #f5f5f5;
  color: #333;
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Alerts */
.alert {
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.alert-error {
  color: #b00020;
  background: #ffebee;
}

.alert-success {
  color: #2e7d32;
  background: #e8f5e9;
}

.alert-success a {
  color: #2e7d32;
  text-decoration: underline;
}

/* Profile */
.avatar-preview {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 2px solid #ddd;
  object-fit: cover;
}

.avatar-preview-small {
  max-width: 100px;
  max-height: 100px;
  border-radius: 50%;
  border: 1px solid #ddd;
}

.avatar-preview-container {
  margin-top: 8px;
  display: none;
}

.delete-avatar-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin-top: 8px;
}

.delete-avatar-text {
  color: #d32f2f;
}

/* Links */
.link-secondary {
  color: #666;
  text-decoration: none;
}

.link-center {
  text-align: center;
  margin-top: 20px;
}

/* Board Articles */
.board-nav {
  margin-bottom: 20px;
}

.board-nav-link {
  color: #666;
  text-decoration: none;
}

.board-write-btn {
  float: right;
  margin-top: -8px;
}

.article-meta {
  color: #666;
}

.article-edit-link {
  margin-left: 8px;
  color: #666;
  font-size: 12px;
}

/* Board List */
.board-count {
  color: #666;
  margin-left: 8px;
}

/* Form Button Variants */
.form-button-auto {
  width: auto;
  padding: 10px 20px;
}

.form-button-cancel {
  margin-left: 8px;
}

/* Tag List */
.tag-list {
  margin: 4px 0;
}

/* Form Container Variants */
.form-container-wide {
  max-width: 600px;
}

/* Board Category Tabs */
.board-category-tabs {
  margin: 20px 0;
  border-bottom: 2px solid #eee;
}

.category-tab {
  display: inline-block;
  padding: 12px 20px;
  margin-right: 8px;
  text-decoration: none;
  color: #666;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}

.category-tab.active,
.category-tab:hover {
  color: #333;
  font-weight: bold;
  border-bottom-color: #333;
}

/* Board Navigation */
.board-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0;
  gap: 16px;
}

.board-nav > div {
  flex: 1;
}

.board-search-form {
  display: flex;
  gap: 8px;
}

.board-search-input {
  flex: 1;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.board-search-btn {
  padding: 8px 16px;
  background: #333;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.board-reset-btn {
  padding: 8px 16px;
  background: #ccc;
  color: #333;
  text-decoration: none;
  border-radius: 4px;
}

/* Article List */
.article-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.article-list-item {
  display: flex;
  gap: 16px;
  padding: 10px 15px;
  border-bottom: 1px solid #eee;
}

.article-thumbnail {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  overflow: hidden;
  border-radius: 8px;
}

.article-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-content {
  flex: 1;
}

/* 본문 내용에서 &nbsp; 숨김 처리 */
.article-content,
.article-content * {
  white-space: normal;
}

/* 본문 요약 스타일 */
.article-excerpt {
  margin: 8px 0;
  color: #666;
  font-size: 14px;
  line-height: 1.5;
  white-space: normal;
  word-wrap: break-word;
}

.article-excerpt:hover {
  color: #000;
}

/* &nbsp;를 공백으로 처리 */
.article-excerpt::before,
.article-excerpt::after {
  content: '';
}

.article-title-link {
  font-size: 18px;
  display: block;
  margin-bottom: 8px;
  color: #333;
  text-decoration: none;
}

.article-category-badge {
  display: inline-block;
  padding: 2px 8px;
  background: #f0f0f0;
  border-radius: 4px;
  font-size: 12px;
  color: #666;
  margin-bottom: 8px;
}

.article-meta-container {
  margin-top: 8px;
}

.article-delete-link {
  margin-left: 8px;
  color: #dc3545;
  text-decoration: none;
}

/* Pagination */
.pagination {
  margin-top: 30px;
  text-align: center;
}

.pagination-link {
  display: inline-block;
  padding: 8px 16px;
  margin: 0 4px;
  background: #f0f0f0;
  color: #333;
  text-decoration: none;
  border-radius: 4px;
}

.pagination-link.active {
  background: #333;
  color: white;
}

.pagination-info {
  text-align: center;
  margin-top: 10px;
  color: #666;
}

/* Infinite Scroll */
.infinite-scroll-trigger {
  text-align: center;
  padding: 20px;
}

.loading-indicator {
  display: none;
}

/* Board Footer */
.board-footer-content {
  margin-top: 30px;
}

/* Recommend Section */
.recommend-section {
  margin: 20px 0;
  padding: 16px;
  background: transparent;
  border-radius: 8px;
  display: flex;
  gap: 16px;
  align-items: center;
}

.recommend-btn {
  padding: 8px 16px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.recommend-btn.active {
  background: #333;
  color: white;
  border-color: #333;
}

/* Article Actions */
.article-actions {
  margin: 20px 0;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
  text-align: right;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* 모바일 메뉴는 데스크톱에서 숨김 */

.article-edit-btn {
  display: inline-block;
  padding: 8px 16px;
  background: #333;
  color: white;
  text-decoration: none;
  border-radius: 4px;
}

.article-delete-btn {
  display: inline-block;
  padding: 8px 16px;
  background: #dc3545;
  color: white;
  text-decoration: none;
  border-radius: 4px;
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.gallery-item {
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  background: white;
  transition: transform 0.2s, box-shadow 0.2s;
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.gallery-image-link {
  display: block;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.gallery-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-placeholder {
  width: 100%;
  height: 200px;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
}

.gallery-content {
  padding: 16px;
}

.gallery-title-link {
  font-size: 16px;
  font-weight: bold;
  display: block;
  margin-bottom: 8px;
  color: #333;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.gallery-meta {
  font-size: 12px;
  color: #666;
  margin-top: 8px;
}

.gallery-meta-item {
  margin-top: 4px;
}

.board-list {
  padding: 10px;
}

.board-list ul {
  padding: 0;
  margin: 0;
}

.height-vh-100 {
  height: calc(100vh - 72px);
}

.content-wrap-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
}

h1.title {
  font-size: 28px;
  font-weight: 600;
}


.board-content-wrap {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: start;
  height: 100%;
  width: 100%;
  gap: 24px;
  
}

.board-content-wrap-inner {
  flex: 0 0 75%;
  min-width: 0;
}

.board-sidebar {
  position: sticky;
  top: 72px;
  flex: 0 0 25%;
  align-self: start;
  max-height: calc(100vh - 72px);
  overflow-y: auto;
  border-radius: 12px;
  padding: 24px 0px;
}

.board-sidebar-content {
  display: flex;
  flex-direction: column;
}

@media (max-width: 768px) {
  .content-wrap iframe{
    width: 100%;
  }

  .board-content-wrap {
    flex-direction: column;
  }

  /* 데스크톱 버전은 모바일에서 숨김 */
  .article-actions {
    display: none;
  }

  /* 모바일 하단 팝업 메뉴 오버레이 */
  .article-actions-mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99998;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: block;
  }

  /* 모바일 하단 팝업 메뉴 */
  .article-actions-mobile {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 20px 20px 0 0;
    padding: 8px 0;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    z-index: 99999;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    display: block;
  }

  .article-action-item {
    width: 100%;
    padding: 16px 20px;
    border: none;
    background: transparent;
    color: #000000;
    font-size: 16px;
    font-weight: 400;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: flex-start;
  }

  .article-action-item:active {
    background-color: rgba(0, 0, 0, 0.05);
  }

  .article-action-item.article-action-delete {
    color: #dc3545;
  }

  .article-action-item.article-action-delete:active {
    background-color: rgba(220, 53, 69, 0.1);
  }

  .form-container { 
    width: 100%; 
  }

  /* 공유 버튼 (appbar-right 내부 - 모바일용) */
  .article-share-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: #333;
    font-size: 20px;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 0;
    margin: 0;
    margin-right: 8px;
    visibility: visible !important;
    opacity: 1 !important;
    transition: background-color 0.2s ease;
  }

  .article-share-btn:active {
    background-color: rgba(0, 0, 0, 0.1);
  }

  .article-share-btn i {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .height-vh-100 {
    height: auto;
  }
  
  .content-wrap-inner {
    height: auto;
  }

  .board-sidebar-content {
    padding: 0 15px;
  }

  
  /* PC에서는 모바일 공유 버튼 숨김 */
  @media (min-width: 769px) {
    .article-share-btn {
      display: none !important;
    }
  }

  /* 블로그 공유 버튼 (모바일 - appbar-right 내부) */
  .blog-share-btn-mobile {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: #333;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 0;
    margin: 0;
    visibility: visible;
    opacity: 1;
    transition: background-color 0.2s ease;
  }

  .blog-share-btn-mobile:active {
    background-color: rgba(0, 0, 0, 0.1);
  }

  .blog-share-btn-mobile i {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* 블로그 공유 버튼 (PC 버전) */
  .blog-share-btn-desktop {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 0;
    margin: 0;
    margin-left: 12px;
    transition: background-color 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
  }

  .blog-share-btn-desktop:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: #333;
  }

  .blog-share-btn-desktop:active {
    background-color: rgba(0, 0, 0, 0.1);
  }

  .blog-share-btn-desktop i {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  @media (max-width: 768px) {
    .blog-share-btn-desktop {
      display: none;
    }
  }

  /* 게시글 헤더 상단 레이아웃 */
  .article-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
  }

  /* 게시글 공유 버튼 (PC 버전) */
  .article-share-btn-desktop {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 0;
    margin: 0;
    margin-top: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
  }

  .article-share-btn-desktop:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: #333;
  }

  .article-share-btn-desktop:active {
    background-color: rgba(0, 0, 0, 0.1);
  }

  .article-share-btn-desktop i {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .board-content-wrap-inner {
    flex: 0 0 100%;
    width: 100%;
  }

  @media (max-width: 768px) {
    .article-share-btn-desktop {
      display: none;
    }
  }

  /* 더보기 버튼 (appbar-right 내부) */
  .article-more-menu-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: #333;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 0;
    margin: 0;
    visibility: visible;
    opacity: 1;
    transition: background-color 0.2s ease;
  }

  .article-more-menu-btn:active {
    background-color: rgba(0, 0, 0, 0.1);
  }

  .article-more-menu-btn i {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* 게시판 작성 버튼 (모바일 - appbar-right 내부) */
  .board-write-btn-mobile {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: #333;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 0;
    margin: 0;
    visibility: visible;
    opacity: 1;
    transition: background-color 0.2s ease;
  }

  .board-write-btn-mobile:active {
    background-color: rgba(0, 0, 0, 0.1);
  }

  .board-write-btn-mobile i {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* PC에서는 모바일 작성 버튼 숨김 */
  @media (min-width: 769px) {
    .board-write-btn-mobile {
      display: none !important;
    }
  }

  /* 모바일에서는 PC 작성 버튼 숨김 */
  @media (max-width: 768px) {
    .board-write-btn {
      display: none !important;
    }
    
    /* 모바일에서는 PC 제출 버튼 숨김 */
    .article-submit-btn {
      display: none !important;
    }
  }

  /* 게시글 제출 버튼 (모바일 - appbar-right 내부) */
  .article-submit-btn-mobile {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: #333;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 0;
    margin: 0;
    visibility: visible;
    opacity: 1;
    transition: background-color 0.2s ease;
  }

  .article-submit-btn-mobile:active {
    background-color: rgba(0, 0, 0, 0.1);
  }

  .article-submit-btn-mobile i {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* PC에서는 모바일 제출 버튼 숨김 */
  @media (min-width: 769px) {
    .article-submit-btn-mobile {
      display: none !important;
    }
  }
}