/* デモカー展示スケジュール用CSS */

.wrapper {
    background: #f2f2f2;
}

#democarScheduleSec {
    padding-bottom: 160px;
}

.noData {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    color: #666;
}

/* ガントチャートコンテナ */
.gantt-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* ヘッダー部分 */
.timeline-header-wrapper {
    overflow: hidden;
}

.gantt-header {
    display: flex;
    flex-shrink: 0;
}

.gantt-sidebar-header {
    width: 240px;
    min-width: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #666;
}

.gantt-timeline-header {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    user-select: none;
    -webkit-user-drag: none;
    border-left: 2px solid #1e1e1e;
    border-right: 2px solid #1e1e1e;
}

.gantt-timeline-header::-webkit-scrollbar {
    display: none;
}

.gantt-timeline-header {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.timeline-header-container {
    display: flex;
    min-width: max-content;
    border-bottom: 1px solid #d6d6d6;
}

/* ボディ部分 */
.gantt-body {
    display: flex;
    flex: 1;
    min-height: 400px;
    max-height: 800px;
}

.gantt-sidebar {
    width: 240px;
    min-width: 240px;
    overflow-y: auto;
    flex-shrink: 0;
    user-select: none;
    -webkit-user-drag: none;
    position: relative;
    cursor: grab;
}

.gantt-sidebar::-webkit-scrollbar {
    display: none;
}

.gantt-sidebar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* サイドバー全体をドラッグ可能にするため、::beforeは削除 */

.gantt-timeline {
    flex: 1;
    overflow-x: auto;
    overflow-y: auto;
    background: #fff;
    user-select: none;
    -webkit-user-drag: none;
    border-left: 2px solid #1e1e1e;
    border-right: 2px solid #1e1e1e;
}

.gantt-timeline::-webkit-scrollbar {
    display: none;
}

.gantt-timeline {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* 日単位ヘッダー */
.daily-header {
    display: flex;
    flex-direction: column;
    height: 77px;
    flex-shrink: 0;
}

.month-titles {
    display: flex;
    background: #8e8e8e;
    height: 45px;
}

.month-titles .month-title {
    background: #8e8e8e;
    color: white;
    height: 45px;
    line-height: 45px;
    font-size: 14px;
    border-right: 1px solid #d6d6d6;
    display: flex;
    padding: 0 20px;
}

.month-titles .month-number {
    font-size: 20px;
    letter-spacing: .2em;
}

.daily-header .days-header {
    display: flex;
    background: #fff;
    height: 32px;
}

.daily-column {
    display: flex;
    height: 64px;
    flex-shrink: 0;
}

/* 月ヘッダー */
.month-header {
    display: inline-block;
    vertical-align: top;
    border-right: 1px solid #ccc;
    height: 77px;
    flex-shrink: 0;
}

.month-title {
    background: #8e8e8e;
    color: white;
    padding: 0 20px;
    height: 45px;
    line-height: 45px;
    font-size: 14px;
    border-right: 1px solid #d6d6d6;
}

.month-number {
    font-size: 20px;
    letter-spacing: .2em;
}

.days-header {
    display: flex;
    background: #fff;
    border-right: 1px solid #d6d6d6;
    height: 32px;
}

.day-header {
    min-width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    font-size: 12px;
    color: #666;
    flex-shrink: 0;
}

/* 今日の日付のハイライトは削除 */

/* 車両名 */
.car-name {
    height: 64px;
    padding: 10px;
    border-bottom: 1px solid #d6d6d6;
    cursor: pointer;
    display: flex;
    align-items: start;
    font-size: 12px;
    font-weight: 500;
    position: relative;
    background: #fff;
    z-index: 10;
}

.car-name:nth-child(2n) {
    background: #f9f9f9;
}

.car-name .car-title {
    color: #3a8cea;
    font-weight: bold;
}

.car-name:hover {
    background: #e9ecef;
}

.car-name:hover .car-title {
    text-decoration: underline;
}

.car-label {
    background: #ffff00;
    color: #1e1e1e;
    font-size: 10px;
    padding: 0px 6px;
    border-radius: 3px;
    margin-right: 8px;
    font-weight: bold;
}

/* タイムライン行 */
.timeline-container {
    position: relative;
    min-width: max-content;
}

.timeline-row {
    height: 64px;
    border-bottom: 1px solid #d6d6d6;
    position: relative;
    display: flex;
    background: #fff;
}

.timeline-row:nth-child(2n) {
    background: #f9f9f9;
}

.month-column {
    display: inline-flex;
    border-right: 1px solid #d6d6d6;
    height: 64px;
    flex-shrink: 0;
}

.day-cell {
    min-width: 32px;
    height: 64px;
    position: relative;
    background: inherit;
    flex-shrink: 0;
}

.day-cell[data-date$="01"] {
    border-left: 1px solid #d6d6d6;
}

/* 今日の日付のハイライトは削除 */

/* スケジュールバー */
.schedule-bar {
    position: absolute;
    top: 18px;
    height: 24px;
    background: #d6e5ef;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    z-index: 10;
    cursor: pointer;
    overflow: visible;
    white-space: nowrap;
    padding: 0 8px;
}

.schedule-bar.multiple {
    top: 32px;
    height: 24px;
    font-size: 10px;
}

/* スライドコントロール */
.slide-controls-wrapper {
    position: relative;
    width: 100%;
    height: 40px;
    display: flex;
    justify-content: space-between;
    border-left: 2px solid #1e1e1e;
    border-right: 2px solid #1e1e1e;
}

.slide-controls {
    cursor: pointer;
    font-size: 24px;
    transition: all 0.2s;
    color: #1e1e1e;
}

.slide-prev {
    margin-left: 10px;
}

.slide-next {
    margin-right: 10px;
}

/* モーダル */
.democarModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: -1;
    opacity: 0;
}

.democarModal.is-active {
    pointer-events: auto;
    z-index: 100;
    opacity: 1;
}

.democarModal-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    cursor: pointer;
    background: rgb(213, 213, 213, .5);
    backdrop-filter: blur(30px);
    opacity: 0;
    transition: opacity 0.3s;
}

.democarModal.is-active .democarModal-overlay {
    opacity: 1;
}

.democarModal-content {
    position: relative;
    width: 100%;
    max-width: 500px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    transition-delay: 0.3s;
}

.democarModal.is-active .democarModal-content {
    opacity: 1;
}

.democarModal-content::before {
    content: "";
    display: block;
    width: 44px;
    height: 44px;
    background-image: url(../images/close_24dp_5F6368_FILL0_wght100_GRAD0_opsz24.svg);
    background-size: cover;
    background-repeat: no-repeat;
    position: absolute;
    top: -49px;
    right: 0;
}

.democarModal-body {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    background-color: #fefefe;
    margin: auto;
    padding: 0;
    border-radius: 8px;
    width: 100%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
    padding: 7.5% 0;
}

.democarModal-image {
    flex: 1;
    width: 85%;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.democarModal-image:has(.no-image) {
    background-color: #f9f9f9;
    border: 1px solid #d6d6d6;
}

.democarModal-image .no-image {
    width: 100%;
    height: 50vw;
    max-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: #666;
}

.democarModal-image img {
    width: 100%;
    height: auto;
}

.democarModal-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 85%;
    gap: 15px;
}

.democarModal-title {
    font-size: 18px;
    font-weight: bold;
}

.democarModal-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 80px;
    padding: 5% 0;
}

.btn {
    padding: 10px 40px;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s;
}

.btn-detail {
    border: 1px solid #333;
    font-size: 14px;
    display: inline-block;
    width: auto;
}

.btn-consultation {
    background: #3a8cea;
    color: #fff !important;
    border-radius: 2em;
    padding: 15px 80px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {

    .gantt-sidebar-header,
    .gantt-sidebar {
        width: 180px;
        min-width: 180px;
    }

    .car-name {
        padding: 0 10px;
        font-size: 11px;
    }

    .day-header,
    .day-cell {
        min-width: 24px;
    }

    .schedule-bar {
        font-size: 10px;
        padding: 0 4px;
    }

    .modal-body {
        flex-direction: column;
        padding: 15px;
    }

    .modal-image {
        max-width: 100%;
    }
}

@media (max-width: 480px) {

    .gantt-sidebar-header,
    .gantt-sidebar {
        width: 100px;
        min-width: 100px;
    }

    .gantt-body {
        max-height: 500px;
    }

    .car-name {
        font-size: 10px;
        padding: 0 8px;
        flex-wrap: wrap;
        align-content: center;
        line-height: 1.3em;
        gap: 3px;
    }

    .day-header,
    .day-cell {
        min-width: 20px;
    }

    .schedule-bar {
        font-size: 9px;
        padding: 0 2px;
    }

    .democarModal-links {
        gap: 40px;
    }

    .btn-consultation {
        padding: 15px 50px;
    }
}