/* Navid support tickets — Figma 183:12490 / 183:12754 */

.navid-tickets-page {
    width: 100%;
    max-width: var(--navid-profile-content-w, 900px);
    font-family: var(--navid-font);
}

.navid-tickets-page__alert {
    margin: 0 0 24px;
    padding: 16px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 400;
    line-height: normal;
    text-align: center;
}

.navid-tickets-page__alert--success {
    background: rgba(0, 146, 148, 0.1);
    color: var(--navid-green);
}

.navid-tickets-page__header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 40px;
    direction: rtl;
}

.navid-tickets-page__title {
    margin: 0;
    min-height: var(--navid-profile-item-h, 56px);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    color: var(--navid-secondary);
    font-size: 32px;
    font-weight: 500;
    line-height: normal;
    text-align: right;
}

.navid-tickets-page__list {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
}

.navid-ticket-card {
    display: block;
    width: 100%;
    padding: 24px;
    border: 1px solid var(--navid-tertiary);
    border-radius: 4px;
    background: var(--navid-white);
    color: inherit;
    text-decoration: none !important;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.navid-ticket-card:hover {
    border-color: rgba(243, 112, 58, 0.35);
    box-shadow: 0 8px 24px rgba(31, 45, 61, 0.06);
}

.navid-ticket-card--static {
    pointer-events: none;
    margin-bottom: 24px;
}

.navid-ticket-card--static:hover {
    border-color: var(--navid-tertiary);
    box-shadow: none;
}

.navid-ticket-card__meta {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--navid-tertiary);
    color: var(--navid-blue);
    font-size: 20px;
    font-weight: 500;
    line-height: normal;
    text-align: right;
    direction: rtl;
}

.navid-ticket-card__subject,
.navid-ticket-card__priority {
    margin: 0;
}

.navid-ticket-card__message-row,
.navid-ticket-card__message-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 24px;
    direction: rtl;
}

.navid-ticket-card__message-row {
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
}

.navid-ticket-card__time {
    flex-shrink: 0;
    color: var(--navid-gray);
    font-size: 14px;
    font-weight: 400;
    line-height: normal;
    white-space: nowrap;
}

.navid-ticket-card__message {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    color: var(--navid-gray);
    font-size: 16px;
    font-weight: 400;
    line-height: normal;
    text-align: justify;
}

.navid-ticket-card__reply {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    border-radius: 4px;
    background: var(--navid-tertiary);
    color: var(--navid-gray);
    text-align: justify;
}

.navid-ticket-card__reply-title {
    margin: 0;
    font-size: 20px;
    font-weight: 500;
    line-height: normal;
}

.navid-ticket-card__reply-body {
    margin: 0;
    font-size: 16px;
    font-weight: 400;
    line-height: normal;
}

.navid-tickets-page__empty {
    margin: 0;
    padding: 32px 16px;
    color: var(--navid-gray);
    font-size: 16px;
    font-weight: 400;
    line-height: normal;
    text-align: center;
}

.navid-tickets-page__pagination {
    margin-top: 24px;
}

/* Ticket detail */
.navid-ticket-show {
    width: 100%;
    max-width: var(--navid-profile-content-w, 900px);
    font-family: var(--navid-font);
}

.navid-ticket-show__back-icon {
    display: block;
    width: 20px;
    height: 20px;
}

.navid-ticket-show__back-icon path {
    stroke: currentColor;
}

.navid-ticket-show__back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    color: var(--navid-gray);
    font-size: 15px;
    font-weight: 400;
    line-height: normal;
    text-decoration: none !important;
    direction: rtl;
}

.navid-ticket-show__back:hover {
    color: var(--navid-primary);
}

.navid-ticket-show__title {
    margin: 0 0 40px;
    min-height: var(--navid-profile-item-h, 56px);
    display: flex;
    align-items: center;
    color: var(--navid-secondary);
    font-size: 32px;
    font-weight: 500;
    line-height: normal;
    text-align: right;
}

.navid-ticket-show__thread {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 40px;
}

.navid-ticket-message {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 24px;
    border: 1px solid var(--navid-tertiary);
    border-radius: 4px;
    background: var(--navid-white);
    direction: rtl;
}

.navid-ticket-message--admin {
    background: var(--navid-tertiary);
    border-color: var(--navid-tertiary);
}

.navid-ticket-message__head {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.navid-ticket-message__author {
    margin: 0;
    color: var(--navid-secondary);
    font-size: 16px;
    font-weight: 500;
    line-height: normal;
}

.navid-ticket-message__time {
    margin: 0;
    color: var(--navid-gray);
    font-size: 14px;
    font-weight: 400;
    line-height: normal;
    white-space: nowrap;
}

.navid-ticket-message__body {
    margin: 0;
    color: var(--navid-gray);
    font-size: 16px;
    font-weight: 400;
    line-height: normal;
    text-align: justify;
    white-space: pre-wrap;
}

.navid-ticket-message__files {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.navid-ticket-message__file {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 4px 12px;
    border-radius: 4px;
    background: rgba(0, 86, 143, 0.08);
    color: var(--navid-blue);
    font-size: 14px;
    font-weight: 500;
    line-height: normal;
    text-decoration: none !important;
}

.navid-ticket-show__reply-title {
    margin: 0 0 24px;
    color: var(--navid-secondary);
    font-size: 24px;
    font-weight: 500;
    line-height: normal;
    text-align: right;
}

.navid-ticket-show__form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.navid-ticket-show__actions {
    display: flex;
    justify-content: flex-start;
    direction: rtl;
}

.navid-ticket-file-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.navid-ticket-file-field__label {
    margin: 0;
    color: var(--navid-gray-2);
    font-size: 15px;
    font-weight: 400;
    line-height: normal;
    text-align: right;
}

.navid-ticket-file-field__input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--navid-tertiary);
    border-radius: 4px;
    background: var(--navid-white);
    color: var(--navid-gray);
    font-family: inherit;
    font-size: 14px;
    line-height: normal;
    box-sizing: border-box;
}

.navid-tickets-page__toolbar {
    flex-shrink: 0;
}

.navid-tickets-page__create-btn {
    min-width: 0;
}

/* Create ticket modal */
.navid-ticket-create-modal .navid-modal__dialog {
    align-items: stretch;
    gap: 0;
    max-width: 900px;
    width: 100%;
    padding: 64px 124px;
}

.navid-ticket-create-modal__topbar {
    display: none;
}

.navid-ticket-create-modal__close {
    position: absolute;
    top: 23px;
    left: 23px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: var(--navid-tertiary);
    color: var(--navid-gray);
    opacity: 0.8;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.navid-ticket-create-modal__close:hover {
    opacity: 1;
}

.navid-ticket-create-modal__close-icon {
    display: block;
    width: 24px;
    height: 24px;
}

.navid-ticket-create-modal__form {
    display: flex;
    flex-direction: column;
    gap: 84px;
    width: 100%;
    direction: rtl;
}

.navid-ticket-create-modal__body {
    width: 100%;
}

.navid-ticket-create-modal__title {
    margin: 0 0 40px;
    color: var(--navid-secondary);
    font-size: 24px;
    font-weight: 500;
    line-height: normal;
    text-align: center;
}

.navid-ticket-create-modal__fields {
    display: flex;
    flex-direction: column;
    gap: var(--navid-form-row-gap, 24px);
    width: 100%;
}

.navid-ticket-create-modal__row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--navid-form-field-gap, 16px);
}

.navid-ticket-create-modal .navid-field--select,
.navid-ticket-create-modal .navid-field__box,
.navid-ticket-create-modal .navid-field__select {
    overflow: visible;
}

.navid-ticket-create-modal .navid-field--select .navid-select.is-open {
    z-index: 20;
}

.navid-ticket-create-modal .navid-field--select .navid-select__list {
    z-index: 30;
}

.navid-ticket-create-modal__actions {
    display: flex;
    justify-content: center;
    width: 100%;
}

.navid-ticket-create-modal__submit {
    min-width: 200px;
}

@media (max-width: 991px) {
    .navid-tickets-page__title,
    .navid-ticket-show__title {
        display: none;
    }

    .navid-tickets-page__header {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin: 0 -16px 0;
    }

    .navid-tickets-page__toolbar {
        width: 100%;
        padding: 24px 16px;
        box-sizing: border-box;
    }

    .navid-tickets-page__create-btn {
        width: 100%;
        min-height: 56px;
        justify-content: center;
    }

    .navid-tickets-page__list {
        gap: 24px;
        padding: 0 0 24px;
    }

    .navid-ticket-card {
        padding: 24px 16px;
    }

    .navid-ticket-card:hover {
        border-color: var(--navid-tertiary);
        box-shadow: none;
    }

    .navid-ticket-card__meta {
        flex-direction: column;
        align-items: flex-end;
        gap: 4px;
        font-size: 15px;
        font-weight: 500;
    }

    .navid-ticket-card__message-row {
        flex-direction: column;
        align-items: flex-end;
    }

    .navid-ticket-card__message {
        width: 100%;
        font-size: 14px;
        text-align: justify;
    }

    .navid-ticket-card__time {
        font-size: 10px;
    }

    .navid-ticket-card__reply-title {
        font-size: 15px;
        font-weight: 600;
    }

    .navid-ticket-card__reply-body {
        font-size: 14px;
    }

    .navid-ticket-show__back {
        display: none;
    }

    .navid-ticket-show__thread {
        margin-bottom: 24px;
    }

    .navid-ticket-show__reply-title {
        font-size: 20px;
        margin-bottom: 16px;
    }

    .navid-ticket-show__actions {
        position: fixed;
        left: 16px;
        right: 16px;
        bottom: calc(var(--navid-mobile-bottom-nav-h, 88px) + 16px);
        z-index: 1002;
    }

    .navid-ticket-show__actions .navid-btn {
        width: 100%;
        justify-content: center;
    }

    .navid-ticket-show__actions .navid-btn__icon {
        display: none;
    }

    .navid-ticket-show {
        padding-bottom: calc(var(--navid-mobile-bottom-nav-h, 88px) + 88px);
    }

    .navid-ticket-create-modal {
        padding: 0;
        align-items: stretch;
    }

    .navid-ticket-create-modal .navid-modal__backdrop {
        background: var(--navid-white);
    }

    .navid-ticket-create-modal .navid-modal__dialog {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        max-width: none;
        min-height: 100%;
        height: 100%;
        padding: 0;
        border-radius: 0;
    }

    .navid-ticket-create-modal__topbar {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        flex-shrink: 0;
        padding: 16px;
        box-sizing: border-box;
    }

    .navid-ticket-create-modal__topbar .navid-ticket-create-modal__close {
        position: static;
        flex-shrink: 0;
        width: 56px;
        height: 56px;
        opacity: 1;
    }

    .navid-ticket-create-modal__topbar .navid-ticket-create-modal__close-icon {
        width: 24px;
        height: 24px;
    }

    .navid-ticket-create-modal__topbar .navid-ticket-create-modal__title {
        margin: 0;
        flex: 1 1 auto;
        min-width: 0;
        color: var(--navid-secondary);
        font-size: 20px;
        font-weight: 500;
        line-height: normal;
        text-align: right;
    }

    .navid-ticket-create-modal__form {
        flex: 1 1 auto;
        min-height: 0;
        gap: 0;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .navid-ticket-create-modal__body {
        flex: 1 1 auto;
        min-height: 0;
        overflow: auto;
        padding: 24px 16px;
        box-sizing: border-box;
    }

    .navid-ticket-create-modal__fields {
        gap: 24px;
    }

    .navid-ticket-create-modal__row {
        grid-template-columns: 1fr;
    }

    .navid-ticket-create-modal__title--desktop {
        display: none;
    }

    .navid-ticket-create-modal .navid-field--textarea .navid-field__box {
        min-height: 168px;
    }

    .navid-ticket-create-modal .navid-field--textarea .navid-field__input {
        min-height: 168px;
        height: 168px;
    }

    .navid-ticket-create-modal__actions {
        flex-shrink: 0;
        padding: 24px 16px;
        box-sizing: border-box;
    }

    .navid-ticket-create-modal__submit {
        width: 100%;
        min-width: 0;
        min-height: 56px;
        justify-content: center;
    }

    .navid-tickets-page {
        padding-bottom: 24px;
    }

    .navid-ticket-create-modal__submit .navid-btn__icon {
        display: none;
    }
}

.navid-ticket-create-modal__title--desktop {
    display: none;
}

@media (min-width: 992px) {
    .navid-ticket-create-modal__topbar {
        display: block;
        position: absolute;
        top: 23px;
        left: 23px;
        padding: 0;
    }

    .navid-ticket-create-modal__topbar .navid-ticket-create-modal__title {
        display: none;
    }

    .navid-ticket-create-modal__title--desktop {
        display: block;
    }
}
