/* static/css/gantt/layout_cf.css */

.cf-timeline-panel {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
    height: 100%;
}

.cf-summary-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.cf-summary-box {
    background: #f7f7f8;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    min-width: 11.25rem;
}

.cf-summary-label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.cf-summary-value {
    font-size: 1.5rem;
    line-height: 1.2;
}

.cf-timeline-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.25rem;
}

.cf-timeline-track {
    width: max-content;
    min-width: 100%;
}

.cf-timeline-grid {
    display: flex;
    gap: 1rem;
    align-items: stretch;
}

/* 修正: 日ごとのカードを広げる */
.cf-point-card {
    width: 18.5rem;
    min-width: 18.5rem;
    background: #f7f7f8;
    border-radius: 0.875rem;
    padding: 0.875rem;
    box-sizing: border-box;
}

.cf-point-date {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.625rem;
}

.cf-point-row {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.cf-point-row-cash {
    padding-top: 0.5rem;
    border-top: 0.0625rem solid #d9d9de;
    margin-top: 0.625rem;
}

.cf-point-items {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.cf-point-item {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.8125rem;
}

.cf-point-empty-card {
    min-width: 18.5rem;
    padding: 1.25rem;
    background: #f7f7f8;
    border-radius: 0.875rem;
}

.cf-start-end-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.cf-start-box,
.cf-end-box {
    background: #f7f7f8;
    border-radius: 0.75rem;
    padding: 1rem 1.125rem;
    min-width: 10rem;
}

.cf-label {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
}

.cf-value {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

.cf-scope-block {
    border-radius: 0.75rem;
    padding: 0.625rem 0.75rem;
    margin-bottom: 0.625rem;
}

.cf-scope-block-selected {
    background: #eef4ff;
}

.cf-scope-block-other {
    background: #f3f4f6;
}

.cf-scope-title {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.375rem;
}

.cf-scope-block .pl-section + .pl-section {
    margin-top: 0.375rem;
}

/* 修正: CF側の太字は少し小さく */
.cf-scope-block .pl-toggle-symbol,
.cf-scope-block .pl-toggle-label {
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.35;
}

.cf-scope-block .pl-toggle-total {
    font-size: 0.92rem;
    line-height: 1.35;
}

/* 修正: 明細ボックスの余白 */
.cf-scope-block .pl-items {
    margin: 0.375rem 0 0.25rem 1.5rem;
    padding: 0.5rem 0.625rem;
}

/* 修正: eeee / 400千円 を2段表示 */
.cf-scope-block .pl-item-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.125rem;
    padding: 0.25rem 0;
}

.cf-scope-block .pl-item-name {
    width: 100%;
    min-width: 0;
    font-size: 0.9rem;
    line-height: 1.35;
    word-break: break-word;
}

.cf-scope-block .pl-item-amount {
    width: 100%;
    font-size: 0.9rem;
    line-height: 1.35;
    white-space: normal;
    text-align: left;
}

@media (max-width: 768px) {
    #cf-split .pane,
    #cf-split .pane-gantt,
    #cf-split .pane-pl {
        position: relative;
    }

    #cf-split .pane-header {
        position: relative;
        z-index: 20;
    }

    #cf-split .pane-header button {
        position: relative;
        z-index: 21;
        pointer-events: auto;
        touch-action: manipulation;
    }

    #cf-split .gantt-wrapper,
    #cf-split .cf-timeline-panel,
    #cf-split .cf-timeline-scroll,
    #cf-split .cf-timeline-track {
        position: relative;
        z-index: 1;
    }

    #cf-split .collapsed-pane-handle {
        z-index: 30;
        pointer-events: auto;
        touch-action: manipulation;
    }
}