/*
 * 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.
 *


 */

html, body {
    height: 100%;
    background-color: var(--smarthr-stone01);
    font-family: "Inter", "Noto Sans JP", "Yu Gothic", "游ゴシック体", "YuGothic", sans-serif;
    color: var(--smarthr-black);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, .title, .subtitle {
    font-family: "Manrope", "Noto Sans JP", sans-serif;
    letter-spacing: -0.02em;
}

.full-height {
    height: 100vh;
    overflow: hidden;
}

.no-break {
    white-space: nowrap; /* 改行を防ぐ */
    word-break: keep-all; /* ハイフンでの改行を防ぐ */
}

/* チケット一覧テーブル */
.ticket-list-table {
    table-layout: fixed;
}

.ticket-list-table td {
    white-space: nowrap;
}

.ticket-list-table td:nth-child(-n+6):not(:nth-child(3)) {
    overflow: hidden;
    text-overflow: ellipsis;
}

:root {
    --smarthr-blue: #5BB9C1;
    --smarthr-black: #191c1d;
    --smarthr-stone01: #f8f9fa;
    --smarthr-stone02: #edeeef;
    --smarthr-stone03: #6e797a;
    --smarthr-stone04: #3e494a;
    --smarthr-white: #ffffff;
    --smarthr-primary-button: #00696f;
    --sidebar-bg: #2d4b4e;
    --sidebar-hover: rgba(255, 255, 255, 0.08);
    --sidebar-active: rgba(0, 105, 111, 0.35);
    --sidebar-text: rgba(255, 255, 255, 0.65);
    --sidebar-text-hover: #ffffff;
    --sidebar-border: rgba(255, 255, 255, 0.08);
}

.sh-background-primary {
    background-color: var(--smarthr-blue);
}
.sh-background-stone01 {
    background-color: var(--smarthr-stone01) !important;
}
.sh-background-stone02 {
    background-color: var(--smarthr-stone02);
}
.sh-color-blue {
    color: var(--smarthr-blue);
}
.sh-color-white {
    color: var(--smarthr-white);
}

.sidebar-column {
    width: 240px;
    flex: none;
}

.sidebar-column + .column {
    overflow-y: auto;
    height: 100vh;
}

/* ===== サイドバーナビゲーション ===== */
.sidebar-nav {
    background-color: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--sidebar-border);
}

.sidebar-logo-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background-color: var(--smarthr-primary-button);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.sidebar-logo-text {
    font-family: "Manrope", "Noto Sans JP", sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.02em;
}

/* プロダクト選択ボタン */
.sidebar-product-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.5rem 0.75rem;
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--sidebar-border);
    border-radius: 0.5rem;
    color: var(--sidebar-text);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s;
}

.sidebar-product-btn:hover {
    background-color: var(--sidebar-hover);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--sidebar-text-hover);
}

.is-block-width {
    width: 100%;
}

.sidebar-dropdown-content {
    background-color: var(--sidebar-bg);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    padding: 0.25rem;
}

.sidebar-dropdown-item {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    color: var(--sidebar-text) !important;
    font-size: 0.95rem;
    border-radius: 0.375rem;
    padding: 0.45rem 0.65rem !important;
    transition: background-color 0.15s;
}

.sidebar-dropdown-item:hover {
    background-color: var(--sidebar-hover) !important;
    color: var(--sidebar-text-hover) !important;
}

.sidebar-dropdown-item.is-active {
    background-color: var(--sidebar-active) !important;
    color: var(--sidebar-text-hover) !important;
}

/* メニューエリア */
.sidebar-menu-area {
    flex: 1;
    padding: 1rem 0.75rem;
    overflow-y: auto;
}

.sidebar-menu-label {
    font-size: 0.8rem !important;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.35) !important;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.5rem 0.5rem 0.35rem;
    margin-bottom: 0.15rem;
}

.sidebar-menu-list a {
    display: flex !important;
    align-items: center;
    gap: 0.65rem;
    color: var(--sidebar-text) !important;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.5rem 0.65rem;
    border-radius: 0.5rem;
    transition: background-color 0.15s, color 0.15s;
    border-left: 3px solid transparent;
}

.sidebar-menu-list a i:first-child {
    width: 1.25rem;
    text-align: center;
    font-size: 1.05rem;
    flex-shrink: 0;
    opacity: 0.7;
}

.sidebar-menu-list a:hover {
    background-color: var(--sidebar-hover) !important;
    color: var(--sidebar-text-hover) !important;
}

.sidebar-menu-list a:hover i:first-child {
    opacity: 1;
}

.sidebar-menu-list a.is-active {
    background-color: var(--sidebar-active) !important;
    color: var(--sidebar-text-hover) !important;
    border-left-color: var(--smarthr-primary-button);
}

.sidebar-menu-list a.is-active i:first-child {
    opacity: 1;
}

.sidebar-external-icon {
    margin-left: auto;
    font-size: 0.6rem !important;
    opacity: 0.4;
}

/* ユーザーエリア */
.sidebar-user-area {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--sidebar-border);
}

.sidebar-user-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background-color: var(--smarthr-primary-button);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-user-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-logout-btn {
    display: block;
    width: 100%;
    padding: 0.35rem 0;
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.375rem;
    color: var(--sidebar-text);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}

.sidebar-logout-btn:hover {
    background-color: var(--sidebar-hover);
    color: var(--sidebar-text-hover);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Bulma のデフォルトカラーを変更しています。 */
/* Sassを導入するともっとスマートに出来そうだが、CSSのみでSmartHR風にしています。 */
/* FIXME: コンポーネントの文字色は個別に設定されているため、bodyのcolorを継承してくれません。個別に上書きが必要です。 */
.button.is-primary {
    background-color: var(--smarthr-primary-button);
}
.pagination-link.is-current {
    background-color: var(--smarthr-primary-button) !important;
}
.pagination-link, .pagination-next, .pagination-previous {
    background-color: var(--smarthr-white);
}

/* プロダクト選択プルダウン（サイドバー内） */
.sidebar-nav .dropdown-menu {
    min-width: 100%;
}

/* HOME画面のプロダクト情報表示スタイル */
.card {
    border: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.card-content .heading {
    color: var(--smarthr-stone04);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.card-content .title {
    margin-bottom: 0;
}

.box {
    background-color: var(--smarthr-white);
    border: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    padding: 2rem;
}

code {
    background-color: var(--smarthr-stone02);
    color: var(--smarthr-black);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-size: 0.9em;
}

/* チケットキーバッジ */
.ticket-key-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background-color: rgba(0, 105, 111, 0.1);
    color: var(--smarthr-primary-button);
    font-family: "Manrope", "Noto Sans JP", sans-serif;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 0.25rem;
}

.ticket-created-at {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--smarthr-stone03);
    font-size: 0.75rem;
}

/* Slack Summary アイコン */
.summary-icon-box {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background-color: rgba(0, 105, 111, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--smarthr-primary-button);
    font-size: 0.95rem;
    flex-shrink: 0;
}

/* AI Generated バッジ */
.ai-generated-badge {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--smarthr-stone03);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ai-generated-dot {
    width: 0.5rem;
    height: 0.5rem;
    background-color: var(--smarthr-blue);
    border-radius: 9999px;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Slack Summary コンテンツのスタイリング */
.slack-summary-content {
    line-height: 1.8;
}

/* セクション見出し（### 1. 問い合わせ概要 など） */
.slack-summary-content h1,
.slack-summary-content h2,
.slack-summary-content h3 {
    font-family: "Manrope", "Noto Sans JP", sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--smarthr-stone04);
    letter-spacing: 0.02em;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-left: 0;
    border-left: none;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.slack-summary-content h1::before,
.slack-summary-content h2::before,
.slack-summary-content h3::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 1rem;
    background-color: var(--smarthr-primary-button);
    border-radius: 9999px;
    flex-shrink: 0;
}

.slack-summary-content h1:first-child,
.slack-summary-content h2:first-child,
.slack-summary-content h3:first-child {
    margin-top: 0;
}

/* 本文テキスト */
.slack-summary-content p {
    color: var(--smarthr-black);
    margin-bottom: 1.25rem;
    padding-left: 0;
}

/* リスト */
.slack-summary-content ul {
    padding-left: 1rem;
    margin-left: 0;
    margin-bottom: 1.5rem;
    list-style: none !important;
}

.slack-summary-content ul ul {
    padding-left: 0;
    margin-top: 0.5rem;
    margin-bottom: 0;
    list-style: none !important;
}

.slack-summary-content ol {
    padding-left: calc(1rem + 1.2rem);
    margin-left: 0;
    margin-bottom: 1.5rem;
}

.slack-summary-content ul > li {
    margin-bottom: 0.5rem;
    padding-left: 1.4rem;
    position: relative;
}

.slack-summary-content ul > li::before {
    content: '\f058'; /* fa-circle-check (regular/outline) */
    font-family: 'Font Awesome 6 Free';
    font-weight: 400;
    position: absolute;
    left: 0;
    top: 0.15em;
    color: var(--smarthr-blue);
    font-size: 0.95em;
}

.slack-summary-content ol > li {
    margin-bottom: 0.5rem;
    padding-left: 0.3rem;
}

/* コードブロック */
.slack-summary-content pre {
    background-color: var(--smarthr-stone02);
    border-left: 4px solid rgba(0, 105, 111, 0.3);
    border-radius: 6px;
    padding: 1rem 1.25rem;
    margin: 1rem 0;
    font-size: 0.9rem;
    line-height: 1.6;
    overflow-x: auto;
}

.slack-summary-content pre code {
    background: none;
    padding: 0;
    font-size: inherit;
}

/* インラインコード */
.slack-summary-content code {
    background-color: var(--smarthr-stone02);
    color: var(--smarthr-black);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-size: 0.95em;
}

/* リンク */
.slack-summary-content a {
    color: var(--smarthr-primary-button);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s;
}

.slack-summary-content a:hover {
    border-bottom-color: var(--smarthr-primary-button);
}

/* 引用 */
.slack-summary-content blockquote {
    background-color: rgba(0, 105, 111, 0.04);
    border-left: 3px solid rgba(0, 105, 111, 0.2);
    border-radius: 0 6px 6px 0;
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    color: var(--smarthr-stone04);
    font-style: italic;
}

/* 強調テキスト */
.slack-summary-content strong {
    color: var(--smarthr-primary-button);
    font-weight: 600;
}

/* スレッド参加者アイコン */
.thread-participants {
    display: flex;
    flex-direction: row-reverse;
}

.thread-participant-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    border: 2px solid var(--smarthr-white);
    background-color: var(--smarthr-blue);
    color: var(--smarthr-white);
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: -0.5rem;
}

.thread-participant-avatar:last-child {
    margin-left: 0;
}

.thread-participant-count {
    background-color: var(--smarthr-stone02);
    color: var(--smarthr-stone03);
    font-size: 0.6rem;
    font-weight: 700;
}

/* Slack チャットスレ */
.thread-messages {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.thread-message {
    display: flex;
    gap: 1rem;
}

.thread-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    background-color: var(--smarthr-stone02);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--smarthr-stone03);
    font-size: 1rem;
    flex-shrink: 0;
}

.thread-message-body {
    flex: 1;
    min-width: 0;
}

.thread-message-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.thread-message-user {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--smarthr-black);
}

.thread-message-time {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--smarthr-stone03);
}

.thread-message-text {
    background-color: var(--smarthr-stone01);
    border-radius: 0.75rem;
    padding: 0.85rem 1rem;
    font-size: 0.875rem;
    color: var(--smarthr-stone04);
    line-height: 1.7;
}

.thread-message-text p {
    margin-bottom: 0.25rem;
}

.thread-message-text p:last-child {
    margin-bottom: 0;
}

/* Ticket Properties */
.prop-section-title {
    font-family: "Manrope", "Noto Sans JP", sans-serif;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--smarthr-stone04);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

.prop-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.prop-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.prop-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--smarthr-stone04);
}

.prop-pill {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 3px;
    letter-spacing: 0.02em;
    line-height: 1.4;
}

.prop-pill-status {
    background-color: #dfe1e6;
    color: #42526e;
}

.prop-pill-status-done {
    background-color: #e3fcef;
    color: #006644;
}

.prop-pill-status-progress {
    background-color: #deebff;
    color: #0747a6;
}

.prop-pill-status-reviewing {
    background-color: #fef3e0;
    color: #c77700;
}

.status-icon-done {
    color: #006644;
}

.status-icon-progress {
    color: #0747a6;
}

.status-icon-reviewing {
    color: #c77700;
}

.status-icon-open {
    color: #42526e;
}

.status-icon-default {
    color: #42526e;
}

.prop-pill-category {
    background-color: rgba(0, 105, 111, 0.1);
    color: var(--smarthr-primary-button);
}

.prop-pill-priority {
    background-color: #f4f5f7;
    color: #42526e;
}

.priority-icon-highest,
.priority-icon-high,
.priority-icon-medium,
.priority-icon-low,
.priority-icon-lowest {
    font-size: 1.1rem;
}

.priority-icon-highest {
    color: #d04437;
}

.priority-icon-high {
    color: #d04437;
}

.priority-icon-medium {
    color: #e8a422;
}

.priority-icon-low {
    color: #4a6785;
}

.priority-icon-lowest {
    color: #4a6785;
}

.prop-value-bold {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--smarthr-black);
}

.prop-empty {
    font-size: 0.875rem;
    color: var(--smarthr-stone03);
    opacity: 0.6;
}

.prop-tags-divider {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.prop-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.ticket-list-card .prop-tags {
    flex-wrap: nowrap;
    overflow: hidden;
}

.prop-tag {
    padding: 0.25rem 0.5rem;
    background-color: var(--smarthr-stone02);
    color: var(--smarthr-stone04);
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 0.25rem;
}

/* External Context リンク */
.ext-links {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.ext-link-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: background-color 0.15s;
}

.ext-link-item:hover {
    background-color: var(--smarthr-stone01);
}

.ext-link-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ext-link-icon-jira {
    background-color: rgba(0, 82, 204, 0.1);
}
.ext-link-icon-jira .icon {
    color: #0052CC;
}

.ext-link-icon-slack {
    background-color: rgba(74, 21, 75, 0.1);
}
.ext-link-icon-slack .icon {
    color: #4A154B;
}

.ext-link-icon-gdrive {
    background-color: rgba(52, 168, 83, 0.1);
}
.ext-link-icon-gdrive .icon {
    color: #34A853;
}

.ext-link-body {
    flex: 1;
    min-width: 0;
}

.ext-link-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--smarthr-black);
}

.ext-link-desc {
    font-size: 0.65rem;
    color: var(--smarthr-stone03);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ext-link-arrow {
    color: var(--smarthr-stone03);
    font-size: 0.75rem;
    transition: color 0.15s;
}

.ext-link-item:hover .ext-link-arrow {
    color: var(--smarthr-primary-button);
}

/* HOME画面: GitHub / FAQ リンクアイコン色 */
.ext-link-icon-github {
    background-color: rgba(36, 41, 46, 0.1);
}
.ext-link-icon-github .icon {
    color: #24292e;
}

.ext-link-icon-faq {
    background-color: rgba(52, 168, 83, 0.1);
}
.ext-link-icon-faq .icon {
    color: #34A853;
}

/* パンくずリスト */
nav.breadcrumb li a {
    color: var(--smarthr-primary-button);
}

nav.breadcrumb li a:hover {
    color: var(--smarthr-stone04);
}

nav.breadcrumb li.is-active a {
    color: var(--smarthr-stone03);
}

nav.breadcrumb li + li::before {
    color: var(--smarthr-stone03);
}

/* チケット一覧テーブルリンク */
.ticket-list-card a {
    color: var(--smarthr-primary-button);
    text-decoration: none;
}

.ticket-list-card a:hover {
    color: var(--smarthr-stone04);
}

/* チケット一覧テーブルカード */
.ticket-list-card {
    background-color: var(--smarthr-white);
    border-radius: 0.75rem;
    border: 1px solid var(--smarthr-stone02);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.ticket-list-card .table {
    margin-bottom: 0;
    background-color: transparent;
}

.ticket-list-card thead th {
    color: var(--smarthr-stone04);
    border-bottom: 1px solid var(--smarthr-stone02);
}

.ticket-list-card tfoot {
    border-top: 1px solid var(--smarthr-stone02);
}

.ticket-list-card tfoot td {
    padding: 1rem 1.5rem;
}

/* 検索フォームカード */
.ticket-search-card {
    background-color: var(--smarthr-white);
    border-radius: 0.75rem;
    border: 1px solid var(--smarthr-stone02);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    padding: 0.75rem 1.25rem;
    margin-bottom: 1.5rem;
}

/* マイワークロード: チケットカード */
.workload-card {
    border-left: 4px solid var(--smarthr-stone03);
    border-radius: 0.75rem;
    transition: box-shadow 0.15s, transform 0.1s;
}

.workload-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.workload-card--critical {
    border-left-color: #BA1A1A;
}

.workload-card--high {
    border-left-color: #E99867;
}

.workload-card--normal {
    border-left-color: #436467;
}

.workload-card--low {
    border-left-color: #6E797A;
}

.stale-alert {
    color: #BA1A1A;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

.workload-ticket-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

