/*
 * Guided ticket requests (assets/js/ticket-guided.js).
 *
 * Only layout and hairlines live here. Text, fields and buttons keep the app's
 * own classes (form-control, btn, text-off), so both themes are covered; the
 * borders and tints below are translucent greys / the theme's primary colour,
 * which read on a white card and on a dark one alike.
 */

.nz-tg-step-title {
    font-size: 20px;
    font-weight: 600;
    margin: 4px 0 4px;
}

.nz-tg-step-help {
    margin-bottom: 18px;
}

.nz-tg-label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

.nz-tg-field {
    margin-bottom: 18px;
}

/* where the person is in the form */
.nz-tg-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    font-size: 12px;
    opacity: .8;
}

.nz-tg-indicator-bar {
    flex: 1;
    height: 4px;
    border-radius: 4px;
    background: rgba(128, 128, 128, .25);
    overflow: hidden;
}

.nz-tg-indicator-bar > span {
    display: block;
    height: 100%;
    border-radius: 4px;
    background: var(--bs-primary, #0d6efd);
    transition: width .2s ease;
}

/* "What do you need?" */
.nz-tg-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.nz-tg-card,
.nz-tg-card:hover,
.nz-tg-card:focus {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(128, 128, 128, .35);
    border-radius: 14px;
    color: inherit;
    text-decoration: none;
    transition: border-color .15s ease, background-color .15s ease;
}

.nz-tg-card:hover,
.nz-tg-card:focus,
.nz-tg-card.active {
    border-color: var(--bs-primary, #0d6efd);
    background: rgba(128, 128, 128, .10);
}

.nz-tg-card-icon {
    font-size: 24px;
    width: 32px;
    text-align: center;
    color: var(--bs-primary, #0d6efd);
}

.nz-tg-card-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.nz-tg-card-text .text-off {
    font-size: 12px;
}

.nz-tg-card-go {
    opacity: .5;
}

/* one answer out of a few */
.nz-tg-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.nz-tg-choice {
    margin: 0;
    cursor: pointer;
}

.nz-tg-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.nz-tg-choice span {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid rgba(128, 128, 128, .35);
    border-radius: 999px;
    transition: border-color .15s ease, background-color .15s ease;
}

.nz-tg-choice:hover span {
    border-color: var(--bs-primary, #0d6efd);
}

.nz-tg-choice input:checked + span {
    border-color: var(--bs-primary, #0d6efd);
    background: rgba(128, 128, 128, .16);
    font-weight: 600;
}

.nz-tg-choice input:focus-visible + span {
    outline: 2px solid var(--bs-primary, #0d6efd);
    outline-offset: 2px;
}

.nz-tg-files .btn {
    margin: 0 6px 6px 0;
}

.nz-tg-file-list:empty {
    display: none;
}

/* the public pages: one centred column */
.nz-tg-page {
    max-width: 760px;
    margin: 0 auto;
}

.nz-tg-page-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 4px;
}

.nz-tg-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.nz-tg-actions .nz-tg-spacer {
    flex: 1;
}

/* the ticket's "Request details" card (team members) */
.nz-tg-details dl {
    margin: 0;
}

.nz-tg-details dt {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
    opacity: .7;
    font-weight: 600;
    margin-top: 10px;
}

.nz-tg-details dd {
    margin: 2px 0 0;
    word-break: break-word;
}

/* the question editor (Settings → Tickets → Ticket types) */
.nz-tgb-step {
    border: 1px solid rgba(128, 128, 128, .35);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 14px;
}

.nz-tgb-field {
    border-top: 1px solid rgba(128, 128, 128, .25);
    padding: 12px 0;
}

.nz-tgb-field .btn {
    padding: 4px 8px;
}

.nz-tgb-required {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 8px 0 0;
    cursor: pointer;
}

/* Bootstrap rows pull 4px out of their box on each side: inside the editor's
   bordered step that is a sideways scrollbar */
#tg-questions-editor {
    overflow-x: hidden;
}

.nz-tgb-step .row {
    margin-left: 0;
    margin-right: 0;
}

/* the public form gives every .form-group a wide margin (external_tickets/index.php):
   the questions of a step sit flush with the step's own title instead */
.client-info-section .nz-tg-pane .form-group.nz-tg-field {
    margin: 0 0 18px;
}

.client-info-section .nz-tg-basics > .form-group {
    margin-left: 0;
    margin-right: 0;
}

/* the modal measures itself before the editor has drawn its steps and keeps a
   sideways scrollbar for content that no longer overflows */
#tg-questions-form .ps__rail-x {
    display: none !important;
}

/*
 * A guided request on the ticket screen (Ticket_guided_forms::cards_html):
 * the steps are section titles, every question and its answer is an iOS 26 card
 * with an icon. Colours are the app's own --ios26-* tokens, which the dark theme
 * re-sets, with a neutral translucent fallback where a page does not define them.
 */
.nz-tg-answers {
    margin: 6px 0 4px;
}

.nz-tg-answers-step {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 18px 2px 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--ios26-muted, inherit);
}

.nz-tg-answers-step:first-child {
    margin-top: 4px;
}

.nz-tg-answers-step i {
    font-size: 14px;
    color: var(--ios26-accent, var(--bs-primary, #0d6efd));
}

.nz-tg-answers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
}

.nz-tg-answer {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid var(--ios26-hairline, rgba(128, 128, 128, .22));
    background: var(--ios26-surface, rgba(128, 128, 128, .07));
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
    min-width: 0;
}

.nz-tg-answer-wide {
    grid-column: 1 / -1;
}

.nz-tg-answer-icon {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--nz-tg-tone, var(--ios26-accent, var(--bs-primary, #0d6efd)));
    background: var(--nz-tg-tone-soft, var(--ios26-accent-soft, rgba(13, 110, 253, .12)));
}

.nz-tg-answer-danger {
    --nz-tg-tone: #ff453a;
    --nz-tg-tone-soft: rgba(255, 69, 58, .14);
}

.nz-tg-answer-warning {
    --nz-tg-tone: #ff9f0a;
    --nz-tg-tone-soft: rgba(255, 159, 10, .16);
}

.nz-tg-answer-success {
    --nz-tg-tone: #34c759;
    --nz-tg-tone-soft: rgba(52, 199, 89, .16);
}

.nz-tg-answer-body {
    flex: 1;
    min-width: 0;
}

.nz-tg-answer-q {
    font-size: 12px;
    line-height: 1.35;
    margin-bottom: 3px;
    color: var(--ios26-muted, inherit);
}

.nz-tg-answer-a {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
    color: var(--ios26-text, inherit);
    overflow-wrap: anywhere;
}

/* the info card's own rows (team members): an icon, a small label, the value */
.nz-tg-details-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    border-top: 1px solid var(--ios26-hairline, rgba(128, 128, 128, .2));
}

.nz-tg-details-row:first-child {
    border-top: 0;
}

.nz-tg-details-row > i {
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--nz-tg-tone, var(--ios26-accent, var(--bs-primary, #0d6efd)));
    background: var(--nz-tg-tone-soft, var(--ios26-accent-soft, rgba(13, 110, 253, .12)));
}

.nz-tg-details-row > div {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}

.nz-tg-details-row small {
    display: block;
    font-size: 11px;
    color: var(--ios26-muted, inherit);
}

/* the message column sits next to the avatar in a flex row and may not shrink
   below its widest child: an attached screenshot (400px) pushed it — and the
   cards with it — out of the bubble on a narrow pane */
.d-flex > .w-100:has(> .nz-tg-answers) {
    min-width: 0;
}

.w-100:has(> .nz-tg-answers) .comment-image-box,
.w-100:has(> .nz-tg-answers) .comment-image-box * {
    max-width: 100%;
}

.w-100:has(> .nz-tg-answers) .comment-image-box img {
    height: auto;
}
