.disp-hide { display: none; }

/* ---- title / description ---- */

.gc-title {
    margin-bottom: 0.25rem;
}

.gc-title > div {
    font-size: 1.5rem;
    font-weight: 600;
}

.gc-description {
    max-width: 680px;
    font-size: 0.92rem;
    color: #444;
    line-height: 1.55;
    margin-bottom: 1.25rem;
}

/* ---- buttons ---- */

.gc-btn {
    padding: 0.38rem 0.9rem;
    border-radius: 4px;
    font-size: 0.95rem;
    cursor: pointer;
    white-space: nowrap;
}

.gc-btn-primary {
    background: #4CAF50;
    color: #fff;
    border: 1px solid #4CAF50;
}

.gc-btn-primary:hover {
    background: #388E3C;
    border-color: #388E3C;
}

.gc-btn-secondary {
    background: #fff;
    color: #333;
    border: 1px solid #ccc;
}

.gc-btn-secondary:hover {
    background: #f5f5f5;
}

.gc-btn-link {
    background: none;
    border: none;
    color: #555;
    text-decoration: underline;
    padding: 0.38rem 0.4rem;
    font-size: 0.9rem;
    cursor: pointer;
}

/* ---- add / edit form ---- */

.gc-add-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    align-items: flex-end;
    padding: 0.85rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fafafa;
    max-width: 860px;
    margin-bottom: 1.25rem;
}

.gc-form-row {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.gc-form-row label {
    font-size: 0.82rem;
    color: #555;
}

.gc-form-row input[type="text"],
.gc-form-row input[type="date"] {
    padding: 0.3rem 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.92rem;
}

.gc-form-row input[type="text"] {
    width: 220px;
}

#gc-dep-on {
    padding: 0.3rem 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.92rem;
    background: #fff;
    min-width: 160px;
}

.gc-form-row input[type="color"] {
    width: 48px;
    height: 32px;
    padding: 2px;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
}

.gc-form-check {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.88rem;
    color: #555;
    padding-top: 0.9rem;
    align-self: flex-end;
    padding-bottom: 0.15rem;
}

.gc-form-check input[type="checkbox"] {
    cursor: pointer;
}

.gc-form-check label {
    cursor: pointer;
}

.gc-form-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    align-self: flex-end;
}

.gc-form-error {
    width: 100%;
    font-size: 0.85rem;
    color: #c62828;
    margin-top: 0.1rem;
}

/* ---- section labels ---- */

.gc-section-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.4rem;
}

/* ---- chart preview ---- */

.gc-chart-wrap {
    position: relative;
    width: max-content;
    min-width: 100%;
}

.gc-deps-svg {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    overflow: visible;
    display: none;
}

.gc-preview-wrap {
    overflow-x: auto;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 0.75rem 0.9rem;
    margin-bottom: 1.5rem;
    background: #fff;
    min-height: 60px;
}

.gc-placeholder {
    color: #bbb;
    font-style: italic;
    font-size: 0.9rem;
    padding: 0.5rem 0;
}

.gc-chart {
    display: grid;
    width: max-content;
    min-width: 100%;
}

/* header row */

.gc-header-label {
    /* empty top-left cell */
}

.gc-header-unit {
    height: 22px;
    font-size: 10px;
    color: #999;
    text-align: center;
    border-bottom: 1px solid #e8e8e8;
    overflow: hidden;
    padding: 0 1px;
    line-height: 18px;
}

/* task rows */

.gc-task-label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding-right: 0.6rem;
    font-size: 0.875rem;
    color: #333;
    min-height: 34px;
    border-bottom: 1px solid #f2f2f2;
}

.gc-task-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gc-edit-btn,
.gc-del-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    color: #ccc;
    padding: 1px 3px;
    line-height: 1;
    flex-shrink: 0;
    border-radius: 3px;
}

.gc-edit-btn:hover { color: #1a73e8; background: #e8f0fe; }
.gc-del-btn:hover  { color: #c62828; background: #fdecea; }

/* bars */

.gc-bar {
    height: 24px;
    border-radius: 3px;
    margin: 5px 2px;
    align-self: center;
    padding: 0 6px;
    font-size: 11px;
    color: rgba(255,255,255,0.92);
    white-space: nowrap;
    overflow: hidden;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f2f2f2; /* keeps row height consistent with label */
}

/* column stripe for alternate task rows */
.gc-chart > .gc-task-label:nth-of-type(odd),
.gc-chart > .gc-bar:nth-of-type(odd) {
    background: #fafafa;
}

/* ---- milestones ---- */

.gc-milestone-bar {
    display: flex;
    align-items: center;
    padding: 0 2px;
    border-bottom: 1px solid #f2f2f2;
}

.gc-diamond {
    width: 14px;
    height: 14px;
    transform: rotate(45deg);
    border-radius: 2px;
    flex-shrink: 0;
}

/* ---- embed section ---- */

.gc-embed-section {
    margin-bottom: 2rem;
}

.gc-embed-code {
    display: block;
    width: 100%;
    max-width: 820px;
    height: 130px;
    font-family: monospace;
    font-size: 0.78rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0.5rem;
    resize: vertical;
    color: #333;
    background: #fafafa;
}

.gc-embed-actions {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    margin-top: 0.5rem;
}

.gc-copy-confirm {
    font-size: 0.85rem;
    color: #2e7d32;
}

/* ---- share section ---- */

.gc-share-section {
    margin-bottom: 2rem;
}

.gc-share-wrap {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.3rem;
    flex-wrap: wrap;
}

.gc-share-url {
    flex: 1;
    min-width: 200px;
    max-width: 520px;
    padding: 0.3rem 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.88rem;
    font-family: monospace;
    color: #333;
    background: #fafafa;
}

.gc-share-note {
    font-size: 0.8rem;
    color: #999;
}

.gc-share-saving {
    font-size: 0.85rem;
    color: #777;
}

/* ---- mobile ---- */

@media (max-width: 600px) {
    .gc-add-form {
        flex-direction: column;
        align-items: stretch;
    }

    .gc-form-row input[type="text"] {
        width: 100%;
    }
}
