/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *



 */

/* 스튜디오 관련 스타일 - 뱃지는 shared/_studio_badge.html.erb 컴포넌트 사용 */
.author-link.studio-author {
  font-weight: 600;
}

/* 구독 스튜디오 아이콘 스타일 (사이드바) */
.server-list-item.subscribed-studio {
  opacity: 0.85;
}

.server-list-item.subscribed-studio:hover {
  opacity: 1;
}

.server-list-item.subscribed-studio .server-avatar-image,
.server-list-item.subscribed-studio .server-avatar-initial {
  /* 점선 테두리 제거됨 */
}

/*
 * 모바일 컴포넌트 스타일
 * - 모바일 공통 헤더
 * - 모바일 슬라이드 사이드바
 * 
 * 이 파일은 application.html.erb와 homepage.html.erb 등
 * 모든 레이아웃에서 공통으로 사용됩니다.
 */

/* ========================================
   모바일 사이드바 오버레이
   ======================================== */
.mobile-sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1100;
}

.mobile-sidebar-overlay.active {
  display: block;
}

/* ========================================
   모바일 슬라이드 사이드바
   ======================================== */
.mobile-sidebar {
  display: none;
  width: 280px;
  background-color: #000000;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 1200;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  flex-direction: column;
  overflow: hidden;
}

.mobile-sidebar.active {
  transform: translateX(0);
}

.mobile-sidebar-content {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* 사용자 정보 섹션 */
.mobile-sidebar-user-section {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* 사용자 정보 섹션 링크 스타일 */
.mobile-sidebar-user-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.2s ease;
}

.mobile-sidebar-user-link:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.mobile-sidebar-user-avatar {
  margin-bottom: 0.75rem;
}

.mobile-sidebar-user-info {
  margin-bottom: 0.75rem;
}

.mobile-sidebar-user-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.125rem;
}

.mobile-sidebar-user-username {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}

.mobile-sidebar-user-stats {
  display: flex;
  gap: 1rem;
}

.mobile-sidebar-stat {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}

.mobile-sidebar-stat strong {
  color: #ffffff;
  font-weight: 600;
}

/* 네비게이션 메뉴 */
.mobile-sidebar-nav {
  padding: 0.5rem 0;
  flex: 1;
}

.mobile-sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1.5rem;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.2s;
}

.mobile-sidebar-nav-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.mobile-sidebar-nav-item.active {
  background-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.mobile-sidebar-nav-item i {
  width: 24px;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.125rem;
}

.mobile-sidebar-nav-item:hover i,
.mobile-sidebar-nav-item.active i {
  color: #ffffff;
}

.mobile-sidebar-nav-admin {
  color: #f59e0b;
}

.mobile-sidebar-nav-admin:hover {
  color: #fbbf24;
}

.mobile-sidebar-nav-admin i {
  color: #f59e0b;
}

.mobile-sidebar-divider {
  height: 1px;
  background-color: rgba(255, 255, 255, 0.1);
  margin: 0.5rem 1.5rem;
}

/* 브랜드 섹션 */
.mobile-sidebar-brand {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: auto;
}

.mobile-sidebar-brand-link {
  text-decoration: none;
}

.mobile-sidebar-brand-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #78716c;
  margin-bottom: 0.75rem;
  display: block;
}

.mobile-sidebar-brand-link:hover .mobile-sidebar-brand-title {
  text-decoration: underline;
}

.mobile-sidebar-social-icons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.mobile-sidebar-social-icon {
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-sidebar-social-icon:hover {
  color: #ffffff;
}

.mobile-sidebar-locale-switcher {
  margin-bottom: 0.75rem;
}

.mobile-sidebar-locale-button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: opacity 0.2s;
}

.mobile-sidebar-locale-button:hover {
  opacity: 0.7;
}

.mobile-sidebar-locale-button .locale-current {
  color: #ffffff;
  font-weight: 500;
}

.mobile-sidebar-locale-button .locale-divider {
  color: rgba(255, 255, 255, 0.4);
}

.mobile-sidebar-locale-button .locale-option {
  color: rgba(255, 255, 255, 0.4);
}

.mobile-sidebar-brand-divider {
  border-top: 1px dotted rgba(255, 255, 255, 0.2);
  margin: 0.75rem 0;
}

.mobile-sidebar-brand-links {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.mobile-sidebar-brand-link-text {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
}

.mobile-sidebar-brand-link-hover {
  transition: color 0.2s;
}

.mobile-sidebar-brand-link-hover:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* 로그아웃 버튼 */
.mobile-sidebar-logout {
  padding-top: 0.5rem;
}

.mobile-sidebar-logout-button {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 0;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s;
}

.mobile-sidebar-logout-button:hover {
  color: #ef4444;
}

.mobile-sidebar-logout-button i {
  font-size: 1rem;
}

/* ========================================
   모바일 공통 헤더 - 트위터 스타일
   ======================================== */
.mobile-common-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: #fff;
  z-index: 100;
  padding-top: env(safe-area-inset-top);
  border-bottom: 1px solid hsl(240, 5.9%, 90%);
  transition: transform 0.25s ease-out;
}

.mobile-common-header.header-hidden {
  transform: translateY(calc(-100% - env(safe-area-inset-top)));
}

.mobile-common-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  min-height: 56px;
}

.mobile-header-profile-button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
}

.mobile-header-profile-button img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.mobile-header-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-header-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1a1a1a;
}

.mobile-header-logo {
  height: 28px;
  width: auto;
  border-radius: 50%;
}

.mobile-header-right-spacer,
.mobile-header-left-spacer {
  width: 40px;
  flex-shrink: 0;
}

/* 모바일 헤더 피드 탭 (트위터 스타일) */
.mobile-header-tabs {
  display: flex;
  border-top: 1px solid hsl(240, 5.9%, 90%);
}

.mobile-header-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 0;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #6b7280;
  text-decoration: none;
  position: relative;
  transition: color 0.2s;
}

.mobile-header-tab:hover {
  color: #1a1a1a;
  background-color: rgba(0, 0, 0, 0.03);
}

.mobile-header-tab.active {
  color: #1a1a1a;
  font-weight: 700;
}

.mobile-header-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 4px;
  background-color: #1a1a1a;
  border-radius: 2px;
}

/* ========================================
   모바일 반응형 - 768px 이하
   ======================================== */
@media (max-width: 768px) {
  .mobile-sidebar {
    display: flex;
  }

  .mobile-common-header {
    display: block;
  }

  .mobile-header-profile-button {
    width: 40px !important;
    height: 40px !important;
  }

  .mobile-header-profile-button img {
    width: 40px !important;
    height: 40px !important;
  }

  .mobile-header-right-spacer,
  .mobile-header-left-spacer {
    width: 40px !important;
  }
}
/*
  버튼 컴포넌트 스타일
  사용법:
    기본: <button class="btn btn-primary">버튼</button>
    사이즈: <button class="btn btn-primary btn-sm">작은 버튼</button>
    풀 너비: <button class="btn btn-primary btn-full">전체 너비</button>
    
  타입: btn-primary, btn-secondary, btn-danger
  사이즈: btn-sm, btn-md (기본), btn-lg
  기타: btn-full (100% 너비)
*/

/* 기본 버튼 스타일 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
  text-decoration: none;
  border: none;
  line-height: 1.5;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Primary 버튼 - 주요 액션용 */
.btn-primary {
  background-color: #1a1a1a;
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background-color: #2d2d2d;
}

/* Secondary 버튼 - 보조 액션용 */
.btn-secondary {
  background-color: #f5f5f5;
  color: #1a1a1a;
}

.btn-secondary:hover:not(:disabled) {
  background-color: #e5e5e5;
}

/* Danger 버튼 - 위험한 액션용 */
.btn-danger {
  background-color: #fff;
  color: #dc2626;
  border: 2px solid #dc2626;
}

.btn-danger:hover:not(:disabled) {
  background-color: #dc2626;
  color: #fff;
}

/* Ghost 버튼 - 투명 배경 */
.btn-ghost {
  background-color: transparent;
  color: #1a1a1a;
}

.btn-ghost:hover:not(:disabled) {
  background-color: #f5f5f5;
}

/* 사이즈 변형 */
.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1rem;
}

/* 전체 너비 */
.btn-full {
  width: 100%;
}

/* 아이콘만 있는 버튼 */
.btn-icon {
  padding: 0.5rem;
  width: 2.5rem;
  height: 2.5rem;
}

.btn-icon.btn-sm {
  width: 2rem;
  height: 2rem;
  padding: 0.375rem;
}

.btn-icon.btn-lg {
  width: 3rem;
  height: 3rem;
  padding: 0.625rem;
}
