.goodnotes-ui {
    --goodnotes-primary: #3451b2;
    --goodnotes-primary-dark: #263f99;
    --goodnotes-soft: #eef2ff;
    --goodnotes-ink: #172554;
}

.goodnotes-ui .goodnotes-header {
    padding-top: 1.35rem;
    padding-bottom: 1rem;
}

.goodnotes-ui .goodnotes-header h1 {
    color: var(--goodnotes-ink);
    font-weight: 700;
    letter-spacing: -.02em;
}

.goodnotes-kicker {
    display: inline-block;
    margin-bottom: .35rem;
    color: var(--goodnotes-primary);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.goodnotes-header-actions .btn {
    margin-left: .35rem;
}

.goodnotes-header-actions {
    margin-left: auto;
    text-align: right;
}

.goodnotes-workspace-nav-section {
    padding-bottom: 0;
}

.goodnotes-workspace-nav {
    border: 0;
    border-radius: .25rem;
}

.goodnotes-workspace-nav .nav-pills {
    gap: .5rem;
}

.goodnotes-workspace-nav .nav-link {
    min-width: 0;
    padding: .85rem 1rem;
    color: #52606d;
    border-radius: .25rem;
    font-weight: 700;
    transition: color .18s ease, background-color .18s ease;
}

.goodnotes-workspace-nav .nav-link:hover {
    color: var(--goodnotes-primary);
    background: var(--goodnotes-soft);
}

.goodnotes-workspace-nav .nav-link.active {
    color: #fff;
    background: var(--goodnotes-primary);
}

.goodnotes-workspace-content > .tab-pane > .content {
    padding-top: 0;
}

.goodnotes-intro-card .card-title {
    line-height: 1.45;
}

.goodnotes-richtext {
    line-height: 1.75;
    overflow-wrap: anywhere;
}

.goodnotes-richtext > :last-child {
    margin-bottom: 0;
}

.goodnotes-richtext ul,
.goodnotes-richtext ol {
    padding-left: 1.35rem;
}

.goodnotes-richtext li {
    margin-bottom: .45rem;
}

.goodnotes-status-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-right: 1rem;
    color: #fff;
    border-radius: 18px;
    font-size: 1.35rem;
    box-shadow: 0 8px 18px rgba(0,0,0,.12);
}

.goodnotes-current-status .goodnotes-status-icon {
    display: flex;
    margin-right: auto;
}

.goodnotes-empty-state {
    text-align: center;
}

.goodnotes-empty-state > i {
    font-size: 3rem;
    opacity: .65;
}

.goodnotes-empty-actions,
.goodnotes-card-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .5rem;
}

.goodnotes-card-actions {
    flex: 0 0 auto;
    justify-content: flex-end;
    margin-left: auto;
    padding-left: 1rem;
    text-align: right;
}

.goodnotes-form-actions .btn {
    margin-left: auto;
}

.goodnotes-timeline {
    position: relative;
    padding-left: 1.5rem;
}

.goodnotes-timeline::before {
    position: absolute;
    top: .55rem;
    bottom: .55rem;
    left: .42rem;
    width: 2px;
    background: #dbe3f1;
    content: "";
}

.goodnotes-timeline-item {
    position: relative;
    padding: 0 0 1.25rem .75rem;
}

.goodnotes-timeline-item:last-child {
    padding-bottom: 0;
}

.goodnotes-timeline .timeline-dot {
    position: absolute;
    top: .32rem;
    left: -1.42rem;
    width: 14px;
    height: 14px;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px #cbd5e1;
}

.goodnotes-timeline .timeline-content {
    padding: .85rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: .25rem;
}

.goodnotes-request-summary {
    background: #f8f9fa;
    border-radius: .25rem;
}

.goodnotes-request-details dt,
.goodnotes-request-details dd {
    margin-bottom: .55rem;
}

.goodnotes-status-card .card-title {
    max-width: calc(100% - 260px);
    line-height: 1.6;
}

.goodnotes-chat {
    min-height: 330px;
    max-height: 580px;
    overflow-y: auto;
    background: #f8fafc;
}

.goodnotes-message {
    display: flex;
    margin-bottom: 1rem;
}

.goodnotes-message.message-own {
    justify-content: flex-end;
}

.goodnotes-message .message-bubble {
    width: fit-content;
    max-width: 82%;
    padding: .8rem 1rem .6rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: .9rem .9rem .9rem .25rem;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .05);
    overflow-wrap: anywhere;
}

.goodnotes-message.message-own .message-bubble {
    color: #fff;
    background: var(--goodnotes-primary);
    border-color: var(--goodnotes-primary);
    border-radius: .9rem .9rem .25rem .9rem;
}

.goodnotes-message .message-time {
    display: block;
    margin-top: .45rem;
    color: #6b7280;
    text-align: right;
}

.goodnotes-message.message-own .message-time {
    color: rgba(255,255,255,.72);
}

.goodnotes-message-link {
    font-weight: 600;
    text-decoration: underline;
    overflow-wrap: anywhere;
}

.goodnotes-message.message-own .goodnotes-message-link {
    color: #fff;
}

.goodnotes-message.message-other .goodnotes-message-link {
    color: var(--goodnotes-primary);
}

.goodnotes-chat-card .card-title {
    max-width: calc(100% - 250px);
    line-height: 1.5;
}

.goodnotes-chat-compose-row {
    display: flex;
    align-items: flex-end;
    gap: .65rem;
}

.goodnotes-chat-composer textarea.form-control {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 88px;
    resize: vertical;
}

.goodnotes-chat-send {
    flex: 0 0 auto;
    min-height: 44px;
    padding-right: 1.2rem;
    padding-left: 1.2rem;
}

.goodnotes-support-option {
    display: flex;
    flex-direction: column;
}

.goodnotes-support-option .btn {
    margin-top: auto;
}

.goodnotes-support-form label,
.goodnotes-lookup-form label {
    font-weight: 700;
}

.goodnotes-support-form textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.goodnotes-admin-nav {
    position: sticky;
    top: 64px;
    z-index: 1015;
    border-radius: .75rem;
}

.goodnotes-admin-nav .btn-light {
    color: #475569;
    background: transparent;
    border-color: transparent;
}

.goodnotes-admin-nav .btn-light:hover {
    color: var(--goodnotes-primary);
    background: var(--goodnotes-soft);
}

.goodnotes-ticket-list {
    max-height: 650px;
    overflow-y: auto;
}

.goodnotes-ticket-history-list .list-group-item {
    border-right: 0;
    border-left: 0;
}

.goodnotes-ticket-history-list .badge {
    flex: 0 0 auto;
}

.goodnotes-ui .min-width-0 {
    min-width: 0;
}

.goodnotes-export-batch-table .btn {
    margin-top: .15rem;
    margin-bottom: .15rem;
}

.goodnotes-content-preview {
    max-height: 190px;
    overflow: hidden;
    position: relative;
}

.goodnotes-content-preview::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 40px;
    background: linear-gradient(transparent, #fff);
    content: "";
}

.goodnotes-ui .form-control-lg {
    min-height: 48px;
    font-size: 1rem;
}

.goodnotes-request-form {
    max-width: 1080px;
}

.goodnotes-form-heading {
    margin: 0 0 1rem;
    padding-bottom: .65rem;
    border-bottom: 1px solid #dee2e6;
    font-size: 1.05rem;
    font-weight: 700;
}

.goodnotes-request-form label {
    margin-bottom: .45rem;
    color: #27364b;
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.35;
}

.goodnotes-request-form .form-control {
    min-height: 44px;
    padding: .55rem .8rem;
    border-color: #cbd5e1;
    transition: border-color .16s ease, box-shadow .16s ease;
}

.goodnotes-request-form textarea.form-control {
    min-height: 112px;
    resize: vertical;
}

.goodnotes-request-form .form-control:focus {
    border-color: #7890e8;
    box-shadow: 0 0 0 .2rem rgba(52, 81, 178, .12);
}

.goodnotes-request-form .form-text {
    margin-top: .4rem;
    line-height: 1.45;
}

.goodnotes-form-actions > small {
    max-width: 680px;
}

.goodnotes-ui .verify-box {
    padding: 14px;
    background: #f8f9fa;
    border: 1px solid #e5e9ef;
    border-radius: 8px;
    text-align: center;
}

.goodnotes-ui .verify-box small {
    color: #495057;
    font-weight: 700;
    line-height: 1.45;
}

.goodnotes-ui .verify-box .cf-turnstile {
    display: inline-block;
    max-width: 100%;
}

.goodnotes-ui .card-outline {
    border-top-width: 3px;
}

.goodnotes-ui .table th {
    white-space: nowrap;
}

.dark-mode.goodnotes-ui .goodnotes-header h1 {
    color: #f8fafc;
}

.dark-mode.goodnotes-ui .goodnotes-timeline .timeline-content,
.dark-mode.goodnotes-ui .goodnotes-chat {
    background: #27303a;
    border-color: #3f4b57;
}

.dark-mode.goodnotes-ui .goodnotes-message .message-bubble {
    background: #343a40;
    border-color: #4b545c;
}

.dark-mode.goodnotes-ui .goodnotes-message.message-own .message-bubble {
    background: var(--goodnotes-primary);
}

.dark-mode.goodnotes-ui .goodnotes-request-form label {
    color: #f1f5f9;
}

.dark-mode.goodnotes-ui .goodnotes-request-form .form-control {
    border-color: #56616d;
}

.dark-mode.goodnotes-ui .goodnotes-request-summary {
    background: #343a40;
    border-color: #4b545c !important;
}

.goodnotes-ui .nav-link:focus-visible,
.goodnotes-ui .btn:focus-visible,
.goodnotes-ui .form-control:focus-visible,
.goodnotes-ui .custom-control-input:focus-visible + .custom-control-label::before {
    outline: 3px solid rgba(0, 123, 255, .35);
    outline-offset: 2px;
}

@media (max-width: 767.98px) {
    .goodnotes-ui .goodnotes-header {
        padding-top: 1rem;
    }

    .goodnotes-ui .goodnotes-header h1 {
        font-size: 1.65rem;
    }

    .goodnotes-header-actions {
        display: grid;
        width: 100%;
        margin-left: 0;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: .5rem;
        text-align: left;
    }

    .goodnotes-header-actions .btn {
        min-width: 0;
        margin-left: 0;
        padding-right: .5rem;
        padding-left: .5rem;
        white-space: normal;
    }

    .goodnotes-header-actions .btn:only-child {
        grid-column: 1 / -1;
    }

    .goodnotes-workspace-nav .nav-pills {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .goodnotes-workspace-nav .nav-link {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 72px;
        padding: .6rem .35rem;
        font-size: .8rem;
        line-height: 1.25;
        white-space: normal;
    }

    .goodnotes-workspace-nav .nav-link i {
        margin: 0 0 .35rem !important;
        font-size: 1.05rem;
    }

    .goodnotes-status-icon {
        width: 48px;
        height: 48px;
        border-radius: 14px;
    }

    .goodnotes-message .message-bubble {
        max-width: 92%;
    }

    .goodnotes-chat {
        min-height: 260px;
        max-height: 55vh;
        padding: 1rem;
    }

    .goodnotes-chat-card .card-title {
        float: none;
        max-width: 100%;
        padding-right: 1.75rem;
        font-size: 1rem;
    }

    .goodnotes-chat-card .card-tools {
        position: static;
        float: none;
        clear: both;
        margin-top: .5rem;
        margin-right: 0;
    }

    .goodnotes-chat-compose-row {
        flex-direction: column;
        align-items: stretch;
    }

    .goodnotes-chat-send {
        width: 100%;
    }

    .goodnotes-chat-compose-meta {
        display: block !important;
    }

    .goodnotes-chat-compose-meta > small {
        display: block;
        width: 100%;
    }

    .goodnotes-chat-compose-meta > small:last-child {
        margin-top: .2rem;
        margin-left: 0 !important;
        text-align: right;
    }

    .goodnotes-request-form .form-group {
        margin-bottom: .9rem;
    }

    .goodnotes-form-actions .btn,
    .goodnotes-empty-actions .btn,
    .goodnotes-card-actions .btn,
    .goodnotes-lookup-form .btn[type="submit"] {
        width: 100%;
    }

    .goodnotes-empty-actions,
    .goodnotes-card-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .goodnotes-card-actions {
        width: 100%;
        margin-left: 0;
        padding-left: 0;
        text-align: left;
    }

    .goodnotes-form-actions .btn {
        margin-left: 0;
    }

    .goodnotes-status-card .card-title {
        max-width: calc(100% - 42px);
        padding-right: .5rem;
        font-size: .95rem;
    }

    .goodnotes-status-card .card-title .badge {
        display: inline-block;
        margin-top: .25rem;
        margin-left: 0 !important;
    }

    .goodnotes-support-option + .goodnotes-support-option {
        padding-top: 1rem;
        border-top: 1px solid #dee2e6;
    }

    .goodnotes-admin-nav {
        position: static;
    }

    .goodnotes-admin-nav .btn {
        flex: 1 0 calc(50% - .5rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    .goodnotes-ui *,
    .goodnotes-ui *::before,
    .goodnotes-ui *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
