@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css");

[data-tiptap-target="textarea"] {
    display: none;
}

.ProseMirror {
    outline: none;
}

.tiptap-fixed-menu + div .ProseMirror {
    border: 1px solid #d9dee7;
    border-top: none;
    border-radius: 0 0 10px 10px;
    min-height: 140px;
    background: #fff;
    padding: 12px 14px;
}

.ProseMirror:focus {
    outline: none;
}

.tiptap-fixed-menu + div .ProseMirror:focus {
    border-color: #b9c4d6;
}

.ProseMirror p.is-empty:first-child::before {
    content: attr(data-placeholder);
    color: #999;
    float: left;
    height: 0;
    pointer-events: none;
}

.ProseMirror table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.ProseMirror th,
.ProseMirror td {
    padding: 8px;
    position: relative;
    border: 1px solid #ddd;
}

.ProseMirror .column-resize-handle {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: rgba(0, 0, 0, 0.1);
    cursor: col-resize;
    z-index: 10;
}

.editor .tippy-box {
    all: unset !important;
    background: none !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
}

.tiptap-floating-menu,
.table-bubble-menu {
    position: absolute;
    top: 0;
    left: 0;
    visibility: hidden;
    opacity: 0;
    display: flex;
    gap: 0.5rem;
    background: #fff;
    padding: 0.1rem 0.3rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
    border: 1px solid #ddd;
}

.tiptap-floating-menu button,
.table-bubble-menu .table-action-btn {
    border: none;
    background: none;
    padding: 0.1rem 0.3rem;
    cursor: pointer;
    border-radius: 6px;
    font-size: 1rem;
}

.tiptap-floating-menu button:hover,
.table-bubble-menu .table-action-btn:hover {
    background: #eaeaea;
}

.tiptap-floating-menu button.is-active {
    background: #f3f3f3;
}

.tiptap-floating-menu.tiptap-fixed-menu {
    position: sticky;
    top: 0;
    left: auto;
    visibility: visible;
    opacity: 1;
    z-index: 20;
    margin-bottom: 0;
    width: 100%;
    gap: 0.25rem;
    border: 1px solid #d9dee7;
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
    padding: 6px 8px;
}

.tiptap-floating-menu.tiptap-fixed-menu button {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #334155;
}

.tiptap-floating-menu.tiptap-fixed-menu button:hover {
    background: #eef2f7;
    border-color: #d9dee7;
}

.tiptap-floating-menu.tiptap-fixed-menu button.is-active {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #0f172a;
}

.ticket-attachments-panel {
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 2px dashed #ced4da;
    border-radius: 10px;
    background: #f8f9fa;
    padding: 8px 10px;
    transition: border-color .2s ease, background .2s ease;
}

.ticket-attachments-panel:hover {
    border-color: #adb5bd;
}

.ticket-attachments-section {
    margin-top: 14px;
}

.ticket-attachments-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 4px;
}

.ticket-attachments-panel > [data-controller="filepond"] {
    flex: 1;
    min-width: 0;
}

.ticket-attachments-panel .filepond--root {
    width: 100%;
    margin-bottom: 0;
}

.ticket-attachments-panel .filepond--drop-label {
    display: none;
}

.ticket-attach-add-btn {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #ced4da;
    background: transparent;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    transition: border-color .2s ease, color .2s ease, background .2s ease;
}

.ticket-attach-add-btn:hover {
    border-color: #0d6efd;
    color: #0d6efd;
    background: rgba(13, 110, 253, 0.06);
}

.ticket-wizard-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.ticket-wizard-step {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    transition: color .2s ease;
}

.ticket-wizard-step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    background: #fff;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 600;
    flex-shrink: 0;
    transition: border-color .2s ease, color .2s ease, background .2s ease;
}

.ticket-wizard-step-label {
    font-size: 0.82rem;
    font-weight: 600;
}

.ticket-wizard-step.is-active {
    color: var(--env-color);
}

.ticket-wizard-step.is-active .ticket-wizard-step-number {
    border-color: var(--env-color);
    background: var(--env-color);
    color: #fff;
}

.ticket-wizard-step-divider {
    flex: 1;
    max-width: 60px;
    height: 2px;
    background: #cbd5e1;
}

#form-ticket {
    position: relative;
}

.wizard-loading-overlay {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 21;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(1px);
    border-radius: 0.25rem;
}

.wizard-loading-overlay i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 34px;
    color: #0d6efd;
}

.ticket-success {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 32px 16px 8px;
}

.ticket-success-icon {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: rgba(25, 135, 84, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    animation: ticket-success-pop .35s ease;
}

.ticket-success-icon i {
    font-size: 46px;
    color: #198754;
}

.ticket-success-title {
    font-weight: 700;
    color: #198754;
    margin-bottom: 6px;
}

.ticket-success-text {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 18px;
    max-width: 380px;
}

.ticket-success-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    width: 100%;
}

.ticket-success-detail {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ticket-success-detail-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
    font-weight: 600;
    margin-bottom: 2px;
}

.ticket-success-detail-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: #64748b;
}

@keyframes ticket-success-pop {
    0% { transform: scale(0); opacity: 0; }
    70% { transform: scale(1.12); }
    100% { transform: scale(1); opacity: 1; }
}
