/* static/css/gantt/gantt_chart.css */

/* ========================================
   ガント全体
======================================== */
.gantt-wrapper {
    overflow-x: auto;
    border: 0.0625rem solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.75rem;
    background: #fff;
}

.gantt-popup-wrapper {
    display: none !important;
}

/* 追加: ヘッダー高さだけを安全に詰める */
.gantt-container {
    --gv-upper-header-height: 24px;
    --gv-lower-header-height: 22px;
}

/* ========================================
   空状態
======================================== */
.gantt-wrapper.gantt-empty-mode {
    padding: 0.75rem;
}

.gantt-empty-host {
    width: 100%;
}

.empty-gantt-card {
    width: 100%;
    min-height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 0.0625rem dashed #c8d7ee;
    border-radius: 0.75rem;
    background: #f8fbff;
    cursor: pointer;
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        border-color 0.15s ease,
        background-color 0.15s ease;
}

.empty-gantt-card:hover {
    transform: translateY(-0.0625rem);
    box-shadow: 0 0.375rem 1rem rgba(44, 98, 229, 0.1);
    border-color: #2c62e5;
    background: #f4f8ff;
}

.empty-gantt-plus {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
    color: #2c62e5;
}

.empty-gantt-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2a44;
}

.empty-gantt-text {
    font-size: 0.8125rem;
    color: #64748b;
}

/* ========================================
   シート切替まわり
======================================== */
.sheet-tabs-card {
    margin-bottom: 0;
}

.sheet-tabs + .sheet-tab-add-button {
    margin-left: 0;
}

/* ========================================
   バー色
======================================== */
.bar-wrapper.bar-red .bar {
    fill: #ef4444 !important;
}

.bar-wrapper.bar-blue .bar {
    fill: #3b82f6 !important;
}

.bar-wrapper.bar-green .bar {
    fill: #22c55e !important;
}

.bar-wrapper.bar-orange .bar {
    fill: #f97316 !important;
}

.bar-wrapper.bar-red .bar-progress {
    fill: #dc2626 !important;
}

.bar-wrapper.bar-blue .bar-progress {
    fill: #1d4ed8 !important;
}

.bar-wrapper.bar-green .bar-progress {
    fill: #16a34a !important;
}

.bar-wrapper.bar-orange .bar-progress {
    fill: #ea580c !important;
}

.bar-wrapper.bar-red .bar-label,
.bar-wrapper.bar-blue .bar-label,
.bar-wrapper.bar-green .bar-label,
.bar-wrapper.bar-orange .bar-label {
    fill: #ffffff !important;
    font-weight: 700;
}

/* ========================================
   ドラッグハンドル
======================================== */
.gantt .handle,
.gantt .bar-wrapper .handle,
.gantt .handle.left,
.gantt .handle.right,
.gantt .bar-wrapper .handle.left,
.gantt .bar-wrapper .handle.right {
    width: 1rem !important;
    fill: transparent;
    stroke: none;
    cursor: ew-resize;
}

.gantt .handle.left,
.gantt .bar-wrapper .handle.left {
    transform: translateX(-0.35rem);
}

.gantt .handle.right,
.gantt .bar-wrapper .handle.right {
    transform: translateX(0.1rem);
}

/* 追加: ヘッダー文字だけ少しだけ詰める */
.gantt .upper-header text,
.gantt .lower-header text {
    font-size: 0.75rem;
}

/* 追加: ヘッダー下の余白感を少し抑える */
.gantt .grid-header {
    margin-bottom: 0;
}

/* 追加: Todayボタンを少しだけ小さく */
.gantt .today-button text {
    font-size: 0.75rem;
}

/* 追加: 15日の黒い丸を消す */
.gantt-container .lower-text.current-date-highlight::after,
.gantt .lower-text.current-date-highlight::after,
.lower-text.current-date-highlight::after {
    display: none !important;
    content: none !important;
}

/* 追加: Todayの縦ラインを消す */
.gantt-container .today-highlight,
.gantt-container .current-highlight,
.gantt-container .current-line,
.gantt-container line.today-highlight,
.gantt-container line.current-highlight,
.gantt-container svg path.today-highlight {
    display: none !important;
    opacity: 0 !important;
    stroke: transparent !important;
}

/* 縦スクロールは使わず、高さは内容に合わせて伸ばす */
.gantt-wrapper,
.gantt-wrapper .gantt-container,
.gantt-wrapper .gantt,
.gantt-wrapper svg {
    overflow-y: hidden !important;
    max-height: none !important;
}

/* Frappe Gantt 内部のスクロール要素対策 */
.gantt-wrapper .grid-body,
.gantt-wrapper .grid-header,
.gantt-wrapper .lower-header,
.gantt-wrapper .upper-header {
    overflow-y: hidden !important;
}