/* New ticket dialog — fullscreen modal substituting the old drawer.
   Matches the high-contrast dark layout from the handoff with a 2-column body. */

.newticket-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    z-index: 300;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 24px;
}

.newticket-dialog {
    background: var(--wt-bg);
    border: 1px solid var(--wt-border);
    border-radius: 14px;
    width: 100%;
    max-width: 1280px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

/* Header */
.newticket-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--wt-border);
}

.newticket-head-back {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: transparent;
    border: 0;
    color: var(--wt-fg);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.newticket-head-back:hover { background: var(--wt-bg-2); }

.newticket-head-title {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
    color: var(--wt-fg);
}

.newticket-head-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.newticket-head-cancel {
    background: transparent;
    border: 0;
    color: var(--wt-fg-2);
    font-weight: 600;
    font-size: 13px;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
}

.newticket-head-cancel:hover { color: var(--wt-fg); }

.newticket-head-submit {
    background: var(--wt-primary);
    color: white;
    border: 0;
    padding: 9px 18px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
}

.newticket-head-submit:disabled { opacity: 0.55; cursor: not-allowed; }

/* Body */
.newticket-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.newticket-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.newticket-row-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--wt-fg-2);
}

/* Vertical divider between Tipo and Prioridade on the same row. */
.newticket-row-divider {
    display: inline-block;
    width: 1px;
    align-self: stretch;
    background: var(--wt-border);
    margin: 0 4px;
}

.newticket-type-toggle {
    display: inline-flex;
    gap: 8px;
}

.newticket-type-btn {
    background: transparent;
    border: 1px solid var(--wt-border);
    color: var(--wt-fg-3);
    padding: 6px 14px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 12.5px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.newticket-type-btn:hover { color: var(--wt-fg); border-color: var(--wt-fg-4); }

.newticket-type-btn.is-active.is-public {
    background: oklch(0.55 0.20 245 / 0.20);
    border-color: oklch(0.65 0.20 245);
    color: oklch(0.85 0.16 245);
}

.newticket-type-btn.is-active.is-internal {
    background: oklch(0.55 0.18 60 / 0.22);
    border-color: oklch(0.65 0.18 60);
    color: oklch(0.85 0.16 75);
}

/* Form fields */
.newticket-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.newticket-subject {
    margin-bottom: 22px;
}

.newticket-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--wt-fg-2);
}

.newticket-input {
    background: var(--wt-bg-2);
    border: 1px solid var(--wt-border);
    color: var(--wt-fg);
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 13px;
    width: 100%;
    box-sizing: border-box;
    outline: none;
}

.newticket-input:focus { border-color: var(--wt-primary); }
.newticket-input:disabled { opacity: 0.6; cursor: not-allowed; }

.newticket-search {
    position: relative;
}

.newticket-search > svg {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--wt-fg-4);
    pointer-events: none;
}

.newticket-search > input {
    padding-left: 32px;
}

.newticket-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--wt-bg-2);
    border: 1px solid var(--wt-border);
    border-radius: 8px;
    max-height: 240px;
    overflow-y: auto;
    z-index: 10;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.newticket-dropdown-item {
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
}

.newticket-dropdown-item:hover { background: var(--wt-bg-3); }

.newticket-dropdown-meta {
    margin-left: auto;
    color: var(--wt-fg-4);
    font-size: 11px;
}

.newticket-chip {
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    background: var(--wt-bg-3);
    border: 1px solid var(--wt-border);
    border-radius: 999px;
    font-size: 12px;
}

.newticket-chip button {
    background: transparent;
    border: 0;
    color: var(--wt-fg-3);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

/* Two columns layout */
.newticket-cols {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    gap: 28px;
}

@media (max-width: 980px) {
    .newticket-cols { grid-template-columns: 1fr; }
}

/* Priority */
.newticket-priority-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.newticket-priority {
    background: transparent;
    border: 1px solid var(--wt-border);
    color: var(--wt-fg-3);
    padding: 5px 14px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
}

.newticket-priority.is-low.is-active {
    background: oklch(0.60 0.20 145 / 0.95);
    border-color: oklch(0.60 0.20 145);
    color: white;
}

.newticket-priority.is-medium.is-active {
    background: oklch(0.78 0.18 85 / 0.95);
    border-color: oklch(0.78 0.18 85);
    color: oklch(0.20 0.05 85);
}

.newticket-priority.is-high.is-active {
    background: oklch(0.65 0.18 40 / 0.95);
    border-color: oklch(0.65 0.18 40);
    color: white;
}

.newticket-priority.is-critical.is-active {
    background: oklch(0.55 0.22 25 / 0.95);
    border-color: oklch(0.55 0.22 25);
    color: white;
}

.newticket-priority.is-low:not(.is-active) { color: oklch(0.72 0.18 145); border-color: oklch(0.60 0.20 145 / 0.45); }
.newticket-priority.is-medium:not(.is-active) { color: oklch(0.80 0.18 85); border-color: oklch(0.78 0.18 85 / 0.45); }
.newticket-priority.is-high:not(.is-active) { color: oklch(0.75 0.18 40); border-color: oklch(0.65 0.18 40 / 0.45); }
.newticket-priority.is-critical:not(.is-active) { color: oklch(0.75 0.22 25); border-color: oklch(0.55 0.22 25 / 0.45); }

/* Message editor */
.newticket-message-field { height: 100%; }

.newticket-message-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: var(--wt-bg-2);
    border: 1px solid var(--wt-border);
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    flex-wrap: wrap;
}

.newticket-message-toolbar button {
    background: transparent;
    border: 0;
    color: var(--wt-fg-3);
    width: 26px;
    height: 26px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.newticket-message-toolbar button:disabled { opacity: 0.5; cursor: not-allowed; }
.newticket-message-toolbar button:not(:disabled):hover { background: var(--wt-bg-3); color: var(--wt-fg); }

.newticket-toolbar-fontsize {
    font-size: 11.5px;
    color: var(--wt-fg-3);
    padding: 0 8px;
}

.newticket-toolbar-sep {
    width: 1px;
    height: 16px;
    background: var(--wt-border);
    margin: 0 4px;
}

.newticket-message {
    background: var(--wt-bg-2);
    border: 1px solid var(--wt-border);
    color: var(--wt-fg);
    padding: 12px 14px;
    border-radius: 0 0 8px 8px;
    font-size: 13px;
    width: 100%;
    box-sizing: border-box;
    outline: none;
    resize: vertical;
    min-height: 220px;
    font-family: inherit;
}

.newticket-message:focus { border-color: var(--wt-primary); }

/* Attachments */
.newticket-attachments {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.newticket-file-input {
    display: none;
}

.newticket-attach-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 0;
    color: var(--wt-fg-2);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.newticket-attach-btn:hover { color: var(--wt-fg); }

.newticket-attach-hint {
    font-size: 11.5px;
    color: var(--wt-fg-4);
}

.newticket-attach-list {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.newticket-attach-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    background: var(--wt-bg-2);
    border: 1px solid var(--wt-border);
    border-radius: 6px;
    font-size: 12px;
}

.newticket-attach-name { flex: 1; color: var(--wt-fg); }
.newticket-attach-size { color: var(--wt-fg-4); }
.newticket-attach-item button {
    background: transparent;
    border: 0;
    color: var(--wt-fg-3);
    cursor: pointer;
    font-size: 16px;
}

.newticket-error {
    margin-top: 12px;
    color: oklch(0.7 0.22 25);
    font-size: 12.5px;
}
