/* "Go to" dialog (app/goto-dialog.js) */

.gt-back {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.45);
}

.gt-dialog {
    display: flex;
    flex-direction: column;
    width: min(400px, 100%);
    max-height: calc(100vh - 32px);
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
    font: 14px/1.3 -apple-system, BlinkMacSystemFont, Inter, "Segoe UI", sans-serif;
}
.gt-dialog.is-shake { animation: gt-shake .3s; }
@keyframes gt-shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

.gt-head { flex: none; display: flex; align-items: center; padding: 18px 14px 6px 22px; }
.gt-title { flex: 1; margin: 0; font-size: 20px; font-weight: 600; }
.gt-close {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
}
.gt-close svg { width: 20px; height: 20px; }
.gt-close:hover { background: var(--surface-2); color: var(--text); }

.gt-tabs { flex: none; display: flex; gap: 24px; margin: 0 22px; border-bottom: 2px solid var(--border); }
.gt-tab {
    position: relative;
    padding: 10px 0;
    border: 0;
    background: none;
    color: var(--text-muted);
    font: 600 15px/1 -apple-system, BlinkMacSystemFont, Inter, "Segoe UI", sans-serif;
    cursor: pointer;
}
.gt-tab:hover { color: var(--text); }
.gt-tab[aria-selected="true"] { color: var(--text); }
.gt-tab[aria-selected="true"]::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    border-radius: 2px;
    background: var(--text);
}

.gt-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 22px 8px; }
.gt-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.gt-label { flex: none; width: 40px; color: var(--text-muted); font-size: 13px; }
.gt-field {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 10px 0 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: text;
}
.gt-field--date { flex: 1.5; min-width: 0; }
.gt-field--time { flex: 1; min-width: 0; }
.gt-field.is-focus, .gt-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.gt-field.is-bad { border-color: #ef4444; box-shadow: 0 0 0 1px #ef4444; }
.gt-input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: none;
    color: var(--text);
    font: 15px/1 -apple-system, BlinkMacSystemFont, Inter, "Segoe UI", sans-serif;
    font-variant-numeric: tabular-nums;
}
.gt-icon { flex: none; display: grid; color: var(--text-muted); }
.gt-icon svg { width: 20px; height: 20px; }

.gt-cal { margin-top: 6px; }
.gt-cal-nav { display: flex; align-items: center; justify-content: space-between; padding: 6px 0 10px; }
.gt-cal-month { font-size: 16px; font-weight: 500; }
.gt-cal-arrow {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--text);
    cursor: pointer;
}
.gt-cal-arrow svg { width: 20px; height: 20px; }
.gt-cal-arrow:hover:not(:disabled) { background: var(--surface-2); }
.gt-cal-arrow:disabled { color: var(--text-muted); opacity: .4; cursor: default; }

.gt-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px 0; }
.gt-cal-wd {
    display: grid;
    place-items: center;
    height: 30px;
    border-radius: 6px;
    background: var(--surface-2);
    color: var(--text-muted);
    font-size: 13px;
}
.gt-cal-wd:nth-child(n) { margin-bottom: 6px; border-radius: 0; }
.gt-cal-wd:first-child { border-radius: 6px 0 0 6px; }
.gt-cal-wd:nth-child(7) { border-radius: 0 6px 6px 0; }
.gt-cal-day {
    height: 40px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--text);
    font: 16px/1 -apple-system, BlinkMacSystemFont, Inter, "Segoe UI", sans-serif;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
}
.gt-cal-day:hover:not(:disabled) { background: var(--surface-2); }
.gt-cal-day:disabled { color: var(--text-muted); opacity: .45; cursor: default; }
.gt-cal-day.is-today { text-decoration: underline; text-underline-offset: 4px; }
.gt-cal-day.is-picked { background: var(--text); color: var(--surface); font-weight: 600; }

.gt-foot {
    flex: none;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
    padding: 16px 22px;
    border-top: 1px solid var(--border);
}
.gt-btn {
    height: 40px;
    padding: 0 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: none;
    color: var(--text);
    font: 500 15px/1 -apple-system, BlinkMacSystemFont, Inter, "Segoe UI", sans-serif;
    cursor: pointer;
}
.gt-btn:hover { background: var(--surface-2); }
.gt-btn--primary { border-color: var(--text); background: var(--text); color: var(--surface); }
.gt-btn--primary:hover { background: var(--text); opacity: .9; }

@media (max-width: 480px) {
    .gt-back { padding: 8px; align-items: flex-end; }
    .gt-dialog { width: 100%; }
    .gt-cal-day { height: 36px; font-size: 15px; }
}
