﻿body {
    font-family: "Inter", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
    background-color: #f5f7fb;
}

.brand-icon {
    width: 38px;
    height: 38px;
}

.navbar-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.75rem;
    flex-wrap: nowrap;
    margin-bottom: 0;
}

.navbar-nav .nav-link {
    display: inline-flex;
    align-items: center;
    height: 48px;
    padding: 0;
    font-weight: 500;
    color: #1f2937;
    white-space: nowrap;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus,
.navbar-nav .nav-link.active {
    color: #1d4ed8;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: nowrap;
    flex: 0 0 auto;
}

.nav-search {
    position: relative;
    flex: 0 0 260px;
    max-width: 260px;
    width: 100%;
}

.nav-search .input-icon {
    position: absolute;
    inset-inline-start: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 0.9rem;
}

.nav-search .form-control {
    padding-inline-start: 2.75rem;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background-color: #f9fafb;
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-pill {
    border-radius: 999px;
    padding-inline: 1.2rem;
}

.nav-auth .btn-success {
    background-color: #22c55e;
    border-color: #22c55e;
}

.nav-auth .btn-success:hover,
.nav-auth .btn-success:focus {
    background-color: #16a34a;
    border-color: #15803d;
}

.user-menu .dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.user-menu .dropdown-toggle::after {
    display: none;
}

.user-menu-name {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu-dropdown {
    min-width: 200px;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 0;
}

.user-menu-dropdown .dropdown-item {
    padding: 0.55rem 1rem;
    border-radius: 0.5rem;
}

.user-menu-dropdown .dropdown-item:hover {
    background-color: #f1f5f9;
}

.logout-form {
    margin: 0;
}

.logout-form button {
    background: none;
    border: none;
    padding: 0;
}

.logout-form button.dropdown-item {
    width: 100%;
    text-align: left;
}

.board-switcher .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.board-switcher .nav-link::after {
    display: none;
}

.board-switcher .nav-link .bi-chevron-down {
    font-size: 0.75rem;
}

.board-switcher-menu {
    min-width: 240px;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 0;
}

.board-switcher-menu .dropdown-header {
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding-inline: 1rem;
    padding-block: 0.35rem;
}

.board-switcher-menu .dropdown-item {
    padding: 0.55rem 1rem;
    border-radius: 0.5rem;
}

.board-switcher-menu .dropdown-item.active,
.board-switcher-menu .dropdown-item:active {
    background-color: #eef2ff;
    color: #1d4ed8;
}

.card-elevated {
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
    border-radius: 1.25rem;
}

.section-title {
    font-weight: 600;
    font-size: 1.125rem;
}

.suggestion-list .list-group-item {
    border: none;
    border-bottom: 1px solid #edf2f7;
    padding: 1.5rem 1rem;
}

.suggestion-list .list-group-item:last-child {
    border-bottom: none;
}

.suggestion-meta {
    color: #6b7280;
    font-size: 0.9rem;
}

.vote-pill {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    background-color: #fff;
    padding: 0.45rem 0.75rem;
    font-weight: 600;
    color: #1f2937;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    z-index: 10; /* 確保高於 stretched-link */
    flex-shrink: 0;
}

.vote-pill:hover {
    border-color: #3b82f6;
    background-color: #eff6ff;
    transform: translateY(-2px);
}

.vote-pill:active {
    transform: translateY(0);
}

.vote-pill.voted {
    border-color: #3b82f6;
    background-color: #3b82f6;
    color: #fff;
}

.vote-pill.voted .icon {
    color: #fff;
}

.vote-pill:disabled,
.vote-pill.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.vote-pill.disabled {
    background-color: #f3f4f6;
    border-color: #d1d5db;
    color: #9ca3af;
}

.vote-pill .icon {
    font-size: 0.85rem;
    color: #9ca3af;
    transition: color 0.2s ease;
}

.filter-toolbar .btn {
    border-radius: 999px;
}

.filter-toolbar .btn-check:checked + .btn,
.filter-toolbar .btn:hover {
    background-color: #1d4ed8;
    color: #fff;
}

.filter-dropdown {
    min-width: 200px;
}

.form-floating-label {
    display: block;
    margin-bottom: 1.25rem;
}

.form-floating-label label {
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-check-inline label {
    margin-inline-start: 0.5rem;
}

@media (max-width: 991.98px) {
    .nav-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .nav-actions .nav-search {
        flex: 1 1 auto;
        max-width: 100%;
    }

    .navbar-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .nav-auth {
        justify-content: center;
    }
}

.btn.btn-pointer::after {
    border: 0 !important;
}

.btn-pointer.dropdown-toggle::after {
    background-image: url("data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='%2351596C' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.72,15.78a.75.75,0,0,1-.53.22h-.38a.77.77,0,0,1-.53-.22L6.15,10.64a.5.5,0,0,1,0-.71l.71-.71a.49.49,0,0,1,.7,0L12,13.67l4.44-4.45a.5.5,0,0,1,.71,0l.7.71a.5.5,0,0,1,0,.71Z'/%3e%3c/svg%3e");
    transform: translateY(-50%);
}
.btn-pointer.dropdown-toggle:hover::after,
.btn-pointer.dropdown-toggle:focus::after,
.btn-pointer.dropdown-toggle:active::after,
.btn-pointer.dropdown-toggle.show::after {
    background-image: url("data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='%2351596C' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.72,15.78a.75.75,0,0,1-.53.22h-.38a.77.77,0,0,1-.53-.22L6.15,10.64a.5.5,0,0,1,0-.71l.71-.71a.49.49,0,0,1,.7,0L12,13.67l4.44-4.45a.5.5,0,0,1,.71,0l.7.71a.5.5,0,0,1,0,.71Z'/%3e%3c/svg%3e");
    transform: translateY(-50%);
}

/* Quill 編輯器內容微調 */
.ql-container {
    border: none !important;
}
.ql-toolbar {
    border: none !important;
    border-bottom: 1px solid #e5e7eb !important;
    border-radius: .5rem .5rem 0 0;
}
#DescriptionEditor .ql-container .ql-editor {
    min-height: 180px;
    font-size: 0.95rem;
}
#DescriptionEditor .ql-editor img {
    max-width: 100%;
    height: auto;
    border-radius: .5rem;
}

/* 附件拖拉區 */
.attachment-drop {
    position: relative;
    transition: border-color .2s, background-color .2s;
    cursor: pointer;
}
.attachment-drop.border-dashed { border: 2px dashed #cbd5e1 !important; }
.attachment-drop.dragging { background-color: #eef2ff !important; border-color: #6366f1 !important; }
.attachment-drop ul li { line-height: 1.3; }

/* 建議 Modal 尺寸：寬度 90%，高度不超過視窗 90% */
.modal-suggestion {
    max-width: 90vw;
    width: 90vw;
    margin: 0 auto;
}
/* 讓整個 modal-content 成為滾動容器，而非僅 body 區塊 */
.modal-suggestion .modal-content {
    max-height: 90vh;
    overflow-y: auto; /* 超出時在整個 modal 出現 scrollbar */
    -webkit-overflow-scrolling: touch;
}
/* 移除原本 body 的獨立滾動，避免雙捲軸 */
.modal-suggestion .modal-body {
    overflow: visible;
}

/* Header 也固定頂端 */
.modal-suggestion .modal-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #fff;
    /* 分隔線與視覺浮起感 */
    border-bottom: 1px solid #e5e7eb;
}

/* 滾動時給 header 一點陰影提示 */
.modal-suggestion .modal-content:is(.scrolled) .modal-header {
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

/* Modal footer 固定在底部 (內容滾動) */
.modal-suggestion form { display:flex; flex-direction:column; min-height:100%; }
.modal-suggestion .modal-body { flex:1 1 auto; }
.modal-suggestion .modal-footer { position:sticky; bottom:0; background:#fff; z-index:5; }

/* 行動裝置 <576px 全螢幕效果 */
@media (max-width: 575.98px) {
  .modal-suggestion { width:100vw !important; max-width:100vw !important; margin:0; }
  .modal-suggestion .modal-content { height:100vh; max-height:100vh; border-radius:0; }
  .modal-suggestion .modal-footer { border-top:1px solid #e5e7eb; }
}

/* Quill 圖片 resize (第三方模組常見 class) */
.ql-image-resize-module, .ql-image-resize-module * { box-sizing:border-box; }
.ql-image-resize-module .resize-handles span {
    width:10px; height:10px; border:1px solid #2563eb; background:#fff; position:absolute; box-shadow:0 0 0 1px #fff; }
.ql-image-resize-module .resize-handles span:hover { background:#2563eb; }
.ql-image-resize-module .overlay { outline:2px solid #2563eb; }
.ql-editor img { cursor:default; }

/* 避免 body 出現雙重捲動：當開啟 modal 時只滾動 modal-body */
body.modal-open { overflow: hidden; }

/* Bootstrap 擴充顏色 - Purple (用於貼文狀態 "已完成") */
.bg-purple {
    background-color: #6f42c1 !important;
}

.text-purple {
    color: #6f42c1 !important;
}

.text-bg-purple {
    color: #fff !important;
    background-color: #6f42c1 !important;
}

.bg-opacity-10 {
    --bs-bg-opacity: 0.1;
}

.badge.bg-purple {
    background-color: #6f42c1 !important;
}

