/* static/css/gantt/layout_base.css */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f5f7fb;
    color: #222222;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.page {
    width: 100%;
    max-width: 84rem;
    margin: 0 auto;
    padding: 0.75rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.page-title {
  font-size: 0.8rem;
  color: #9c9c9c;
  font-weight: 400;
  margin: 0.2rem 0;
}

.card,
.sheet-tabs-card {
    background: #ffffff;
    border-radius: 1.25rem;
    padding: 0.75rem 1rem 0.625rem;
    box-shadow: 0 0.125rem 0.5rem rgba(15, 23, 42, 0.08);
}

.toolbar,
.sheet-tabs-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 0.375rem;
}

.toolbar h2 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: #222222;
}

.sheet-tabs-toolbar {
    justify-content: flex-start;
    align-items: center;
    margin: 0;
}

.sheet-tabs {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    flex-wrap: wrap;
    width: 100%;
}

.sheet-tab-button,
.sheet-tab-add-button,
.sheet-tab-copy-button,
.sheet-tab-delete-button {
    border: 0.0625rem solid #d6deeb;
    border-radius: 0.875rem;
    padding: 0.625rem 0.9375rem;
    background: #ffffff;
    color: #1f2a44;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.15s ease;
}

.sheet-tab-add-button {
    background: #f3f8ff;
}

.sheet-tab-copy-button {
    background: #f7f7ff;
    color: #3949ab;
    border-color: #cfd4ff;
}

.sheet-tab-button:hover,
.sheet-tab-add-button:hover,
.sheet-tab-copy-button:hover,
.sheet-tab-delete-button:hover {
    background: #f4f8ff;
    border-color: #9eb8ef;
    transform: translateY(-0.0625rem);
}

.sheet-tab-button:focus,
.sheet-tab-add-button:focus,
.sheet-tab-copy-button:focus,
.sheet-tab-delete-button:focus {
    outline: none;
    box-shadow: 0 0 0 0.1875rem rgba(47, 106, 230, 0.18);
}

.sheet-tab-button.active {
    background: #2f6ae6;
    color: #ffffff;
    border-color: #2f6ae6;
    box-shadow: 0 0.25rem 0.75rem rgba(47, 106, 230, 0.2);
}

.sheet-tab-add-button,
.sheet-tab-copy-button,
.sheet-tab-delete-button {
    min-width: 2.5rem;
    justify-content: center;
    font-size: 1.0625rem;
    padding-inline: 0.6875rem;
}

.sheet-tab-delete-button {
    color: #b42318;
    border-color: #f1c0c0;
    background: #fffafa;
}

.sheet-tab-delete-button:hover {
    background: #fff1f1;
    border-color: #e19a9a;
}

.sheet-tab-copy-button:hover {
    background: #eef0ff;
    border-color: #aeb8ff;
}

.view-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.view-btn {
    border: none;
    border-radius: 0.75rem;
    padding: 0.625rem 1rem;
    background: #2f6ae6;
    color: #ffffff;
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
}

.view-btn:hover {
    opacity: 0.92;
}

.view-btn:focus {
    outline: none;
    box-shadow: 0 0 0 0.1875rem rgba(47, 106, 230, 0.18);
}

.gantt-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    margin: 0;
    padding: 0;
    border-radius: 1rem;
    background: #ffffff;
}

.help-text {
    margin: 0.375rem 0 0;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #4b5563;
}

/* ===============================
   シートタブ
================================= */

.sheet-label-accordion-trigger {
    cursor: pointer;
    user-select: none;
    position: relative;
}

.sheet-label-accordion-trigger::after {
    content: "▲";
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    font-size: 0.75rem;
    font-weight: 700;
    color: #4b5563;
    pointer-events: none;
}

.sheet-label-accordion-trigger.is-collapsed::after {
    content: "▼";
}

#sheet-tabs.is-collapsed {
    display: none;
}

.sheet-label-accordion-trigger.is-collapsed::before {
    content: "シート (複数プロジェクトを作成)";
    font-size: 0.85rem;
    font-weight: 700;
    color: #374151;
}