.markup-two-panel-layout {
    display: flex;
    height: 100vh;
}
.markup-left-panel {
    width: 280px;
    min-width: 200px;
    max-width: 340px;
    background: #f7f7f7;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
}
.markup-actions-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 12px 8px 12px;
    border-bottom: 1px solid #e0e0e0;
    background: #fff;
}
.markup-actions-left {
    display: flex;
    align-items: center;
    gap: 5px;
}
.markup-actions-right {
    display: flex;
    align-items: center;
}
.markup-items-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}
.markup-item-panel {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    margin: 8px 12px;
    padding: 12px 12px 8px 12px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition:
        box-shadow 0.15s,
        background 0.15s;
    cursor: pointer;
}
.markup-item-panel:hover {
    background: #f0f7ff;
    box-shadow: 0 2px 8px rgba(0, 80, 200, 0.08);
}
.markup-item-panel.selected {
    background: #e6f0fa;
    box-shadow: 0 2px 8px rgba(0, 80, 200, 0.12);
}
.markup-item-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}
.markup-item-title {
    font-weight: bold;
    flex: 1;
    margin-right: 8px;
}
.markup-item-status {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    background: #e6f4ea;
    color: #219150;
    margin-left: 8px;
    align-self: flex-start;
}
.markup-badge-success,
.markup-badge-done {
    background: #e6f4ea;
    color: #219150;
}
.markup-badge-in_progress {
    background: #fffbe6;
    color: #bfa100;
}
.markup-badge-error {
    background: #ffeaea;
    color: #d32f2f;
}
.markup-badge-draft {
    background: #eaf0fa;
    color: #1976d2;
}
.markup-badge-starting {
    background: #eaf0fa;
    color: #1976d2;
}
.markup-item-info {
    font-size: 12px;
    color: #888;
    margin-top: 8px;
    display: flex;
    flex-direction: column;
}
.markup-right-panel {
    flex: 1;
    background: #fff;
    overflow-y: auto;
}

.markup-details-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    color: #7a869a;
    text-align: center;
    padding: 32px 0;
}
.markup-details-empty-icon {
    margin-bottom: 16px;
}
.markup-details-empty-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #4a5670;
}
.markup-details-empty-desc {
    font-size: 15px;
    margin-bottom: 18px;
    color: #7a869a;
}
.markup-details-empty-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}
.markup-details-link {
    color: #2196f3;
    text-decoration: underline;
    cursor: pointer;
}
.markup-details-section {
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding-bottom: 5em;
}
.markup-details-info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 32px;
    padding: 24px;
    border-bottom: 1px solid #e0e0e0;
}
.markup-details-extra-row {
    display: block;
    justify-content: space-between;
    align-items: flex-start;
    gap: 32px;
    padding: 24px;
}
.markup-details-info-main {
    flex: 1;
    min-width: 0;
}
.markup-details-title-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}
.markup-details-title {
    font-size: 22px;
    font-weight: 600;
    color: #2a3548;
}
.markup-details-status {
    font-size: 13px;
    padding: 2px 10px;
    border-radius: 10px;
    margin-left: 8px;
    background: #e6f4ea;
    color: #219150;
}
.markup-details-system {
    font-size: 15px;
    color: #6a7a8c;
    margin-bottom: 8px;
}
.markup-details-system-item {
    margin-right: 18px;
}
.markup-details-description {
    font-size: 15px;
    color: #4a5670;
    margin-bottom: 10px;
}
.markup-details-dates {
    font-size: 13px;
    color: #8a98a8;
    margin-top: 6px;
    display: flex;
    gap: 18px;
}
.markup-details-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 140px;
}
.markup-details-actions .btn {
    text-align: left;
    width: 100%;
}

/* Markup Stats Styles */
.markup-stats-grid {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.markup-stats-item {
    flex: 1;
    min-width: 120px;
    text-align: center;
    padding: 15px 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.markup-stats-value {
    font-size: 24px;
    font-weight: bold;
    color: #495057;
    margin-bottom: 5px;
}

.markup-stats-value.markup-stats-broken {
    color: #dc3545;
}

.markup-stats-label {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.markup-stats-labels {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.markup-stats-labels-title {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 10px;
}


.markup-stats-labels {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.markup-stats-labels-title {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 15px;
}

.markup-stats-labels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.markup-stats-label-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    border-left: 4px solid;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.markup-stats-label-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.markup-stats-label-header {
    padding: 8px 12px;
    color: white;
    font-weight: 600;
    font-size: 13px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.markup-stats-label-content {
    padding: 12px;
}

.markup-stats-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid #f8f9fa;
}

.markup-stats-label-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.markup-stats-label-text {
    font-size: 12px;
    color: #6c757d;
    flex: 1;
}

.markup-stats-label-value {
    font-weight: 600;
    font-size: 13px;
    color: #495057;
    text-align: right;
    min-width: 30px;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .markup-stats-labels-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .markup-stats-label-card {
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .markup-stats-labels-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 12px;
    }
}


.markup-creator-top-info-section,
.markup-creator-section {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    padding: 24px 24px 18px 24px;
    margin-top: 16px;
}
.markup-creator-form-row {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.markup-creator-form-group {
    display: flex;
    flex-direction: column;
    min-width: 220px;
    margin-bottom: 0;
}
.markup-creator-label {
    font-size: 15px;
    font-weight: 700;
    color: #4a5670;
    margin-bottom: 7px;
}
.markup-creator-input {
    font-size: 15px;
    border-radius: 6px;
    border: 1px solid #d0d7e2;
    padding: 8px 12px;
    background: #f9fafb;
    transition: border 0.15s;
}
.markup-creator-input:focus {
    border: 1.5px solid #2196f3;
    background: #fff;
    outline: none;
}

.markup-creator-section-block {
  margin-top: 2em;
  padding: 18px 16px;
  border-radius: 8px;
  background: #f8f9fa;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.markup-creator-section-block .ibox {
  margin-bottom: 0;
}
.markup-creator-section-block .ibox-title {
  font-size: 1.1em;
  margin-bottom: 10px;
}
.markup-creator-section-block .form-group {
  margin-bottom: 12px;
}


.markup-task-view-images-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 48px;
    margin-top: 12px;
}

.markup-task-view-image-thumb-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 150px;
    max-height: 200px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    background: #fff;
    overflow: hidden;
    transition: all 0.2s ease;
}

.markup-task-view-image-thumb-wrapper:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.markup-task-view-image-thumb-wrapper.loading {
    opacity: 0.7;
}

.markup-task-view-image-thumb-container {
    position: relative;
    width: 100%;
    height: 120px;
    background: #f7f7f7;
    display: flex;
    align-items: center;
    justify-content: center;
}

.markup-task-view-image-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.markup-creator-image-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 12px;
}

.markup-creator-loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e0e0e0;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.markup-creator-image-info {
    padding: 8px 10px;
    background: #fff;
    border-top: 1px solid #f0f0f0;
}

.markup-creator-image-name {
    font-size: 11px;
    color: #333;
    font-weight: 500;
    margin-bottom: 3px;
    word-break: break-all;
    line-height: 1.2;
    max-height: 2.4em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.markup-creator-image-details {
    font-size: 10px;
    color: #666;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.markup-creator-image-size {
    color: #888;
}

.markup-creator-image-status {
    padding: 2px 6px;
    border-radius: 10px;
    max-width: 60%;
    font-size: 9px;
    font-weight: 500;
    text-transform: uppercase;
}

.markup-creator-image-status.loading {
    background: #fff3cd;
    color: #856404;
}

.markup-creator-image-status.waiting {
    background: #fff3cd;
    color: #856404;
}

.markup-creator-image-status.uploading {
    background: #cce5ff;
    color: #004085;
}

.markup-creator-image-status.success {
    background: #d4edda;
    color: #155724;
}

.markup-creator-image-status.loaded {
    background: #d4edda;
    color: #155724;
}

.markup-creator-image-status.error {
    background: #f8d7da;
    color: #721c24;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: help;
}

.markup-creator-image-status.error:hover {
    overflow: visible;
    white-space: normal;
    word-wrap: break-word;
    z-index: 1000;
    position: absolute;
    max-width: 90%;
    max-height: 100%;
    bottom: 10px;
    left: 5px;
    padding: 5px;
    border-radius: 3px;
    color: white;
    background: rgba(160, 40, 40, 0.9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.markup-task-view-image-thumb-wrapper[data-image-id] {
    border: 2px solid #28a745;
    border-radius: 4px;
}

.markup-task-view-image-thumb-wrapper[data-image-id]
    .markup-creator-image-status.success {
    background-color: #28a745;
    color: white;
    border-radius: 3px;
    padding: 2px 5px;
}

.markup-creator-image-delete-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    color: #dc3545;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.markup-creator-image-delete-btn:hover {
    background-color: #dc3545;
    color: white;
    transform: scale(1.1);
}

.markup-creator-actions-block {
    padding: 24px;
    display: flex;
    gap: 5px;
}

.markup-creator-dropzone {
    border: 2px dashed #bbb;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    background: #f9f9f9;
    transition: all 0.3s ease;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    cursor: alias;
    transition:
        border-color 0.2s,
        background 0.2s;
}

.markup-creator-dropzone.dragover {
    border-color: #4caf50;
    background: #f0fff0;
}

.markup-creator-dropzone-text {
    color: #888;
    font-size: 1.1em;
    pointer-events: none;
}

.markup-creator-form-images {
    flex-direction: row;
}

#markup-creator-images {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.markup-creator-dropzone-text-main {
    font-size: 1.2em;
    margin-bottom: 12px;
    color: #555;
}
.markup-creator-dropzone-actions {
    margin-bottom: 8px;
}
.markup-creator-dropzone-actions .btn-link {
    margin: 0 8px;
    font-size: 1em;
    color: #1976d2;
    text-decoration: underline;
    background: none;
    border: none;
    cursor: pointer;
}
.markup-creator-dropzone-actions .btn-link:hover {
    color: #0d47a1;
    text-decoration: underline;
}

.markup-creator-label-item {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fff;
    padding: 12px 12px 8px 12px;
    margin-bottom: 12px;
}
.markup-creator-label-delete-btn {
    position: absolute;
    top: 8px;
    right: 8px;
}
.markup-creator-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 24px;
    justify-content: flex-start;
    align-items: stretch;
}
.markup-creator-steps div {
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 6px;
    background: #f3f6fa;
    transition:
        background 0.2s,
        color 0.2s;
    display: flex;
    align-items: center;
    min-width: 180px;
    flex: 1 1 6em;
    box-sizing: border-box;
    margin: 0;
}
.markup-creator-steps div.active {
    background: #1976d2;
    color: #fff;
}
.markup-creator-steps div .step-num {
    display: inline-block;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    color: #1976d2;
    font-weight: bold;
    text-align: center;
    line-height: 28px;
    margin-right: 8px;
    border: 2px solid #1976d2;
}
.markup-creator-steps div.active .step-num {
    background: #fff;
    color: #1976d2;
    border-color: #fff;
}

.markup-step-title {
    display: flex;
    align-items: center;
    font-size: 2ex;
}

.markup-step-title::before {
    content: attr(data-step_num);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 34px;
    height: 34px;
    min-height: 34px;
    min-width: 34px;
    background: #f4f4fc;
    border: 1px solid #727272;
    border-radius: 50%;
    font-size: 18px;
    font-weight: 500;
    line-height: 34px;
    color: #727272;
    cursor: default;
    margin-right: 10px;
}

.markup-creator-next-step-btn {
  font-size: 2.5ex;
  margin: 1em 0;
  display: block;
}

.markup-creator-dropzone-text-main {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.markup-creator-instruction-preview {
    margin-top: 10px;
    cursor: default;
}

.markup-creator-example-container {
    margin-top: 15px;
}

.markup-creator-example-drawer {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    max-width: 100%;
    min-height: 400px;
    background: #f9f9f9;
}

.markup-creator-example-controls {
    display: flex;
    margin-top: 10px;
    text-align: center;
}

.markup-creator-example-controls .btn {
    margin: 0 5px;
}

.markup-creator-result-preview {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #d4edda;
    border-radius: 4px;
    background-color: #f8f9fa;
}

.markup-result-summary h4 {
    margin-bottom: 15px;
    color: #28a745;
}

.markup-result-list {
    margin-bottom: 15px;
}

.markup-result-list li {
    margin-bottom: 5px;
    padding: 5px;
    background: #fff;
    border-radius: 3px;
    border-left: 3px solid #007bff;
}

.markup-result-stats {
    background: #e9ecef;
    padding: 10px;
    border-radius: 4px;
}

.markup-result-stats p {
    margin-bottom: 5px;
}

@media (max-width: 900px) {
    .markup-creator-steps div {
        min-width: 140px;
        flex: 1 1 140px;
        font-size: 0.95em;
        padding: 7px 10px;
    }
}
@media (max-width: 600px) {
    .markup-creator-steps div {
        min-width: 100px;
        flex: 1 1 100px;
        font-size: 0.9em;
        padding: 6px 6px;
    }
    .markup-creator-steps {
        gap: 6px;
    }
}

/* Step validation indicators */
.markup-creator-steps div.validated {
    background: linear-gradient(135deg, #1976d2 0%, #28a745 100%);
    color: #fff;
    position: relative;
}

.markup-creator-steps div.validated::after {
    content: "\f00c";
    font-family: "FontAwesome";
    position: absolute;
    top: 4px;
    right: 8px;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.9);
    color: #28a745;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.markup-creator-steps div.validated .step-num {
    background: rgba(255, 255, 255, 0.95);
    color: #1976d2;
    border-color: rgba(255, 255, 255, 0.95);
}

/* Full-size image preview modal */
.markup-image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.markup-image-modal.active {
    opacity: 1;
    visibility: visible;
}

.markup-image-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.markup-image-modal-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.markup-image-modal-info {
    background: rgba(255, 255, 255, 0.95);
    padding: 12px 20px;
    border-radius: 6px;
    margin-top: 15px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.markup-image-modal-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.markup-image-modal-details {
    font-size: 14px;
    color: #666;
}

.markup-image-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    z-index: 10000;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.markup-image-modal-close:hover {
    background: rgba(220, 53, 69, 0.9);
    color: white;
    transform: scale(1.1);
}

.markup-task-view-image-thumb {
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.markup-task-view-image-thumb:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.markup-creator-image-container {
    position: relative;
    width: 100%;
    height: 120px;
    background: #f7f7f7;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.markup-creator-image-container:hover::after {
    content: "\f002";
    font-family: "FontAwesome";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 16px;
    padding: 10px 14px;
    border-radius: 50%;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
    pointer-events: none;
    z-index: 5;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Example result preview styles */
.markup-example-result-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.markup-example-images-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e9ecef;
}

.markup-example-images-title {
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.markup-example-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.markup-example-image-item {
    background: white;
    border-radius: 6px;
    padding: 12px;
    border: 1px solid #dee2e6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.markup-example-image-label {
    font-size: 12px;
    font-weight: 500;
    color: #6c757d;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.markup-example-image-preview {
    width: 100%;
    max-height: 40em;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    object-fit: contain;
    background: #f8f9fa;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.markup-example-image-preview:hover {
    transform: scale(1.02);
}

.markup-example-json-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e9ecef;
}

.markup-example-json-title {
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.markup-example-json-copy-btn {
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.markup-example-json-copy-btn:hover {
    background: #0056b3;
}

.markup-example-json-copy-btn.copied {
    background: #28a745;
}

.markup-example-json-container {
    background: #2d3748;
    border-radius: 6px;
    padding: 6px;
    overflow-x: auto;
    border: 1px solid #4a5568;
    position: relative;
    max-height: 30em;
}

.markup-example-json-content {
    font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre;
    margin: 0;
}

.markup-example-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px;
    color: #6c757d;
}

.markup-example-loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e9ecef;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.markup-example-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 15px;
    margin-top: 10px;
}

/* Tooltip Modal Styles */
.markup-tooltip-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.markup-tooltip-modal.active {
    opacity: 1;
    visibility: visible;
}

.markup-tooltip-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.markup-tooltip-content {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    max-height: 80vh;
    width: 90%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.markup-tooltip-modal.active .markup-tooltip-content {
    transform: scale(1);
}

.markup-tooltip-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e9ecef;
}

.markup-tooltip-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

#markup-tooltip-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding-top: 0;
}

#markup-tooltip-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.markup-tooltip-body {
    padding: 0;
    overflow-y: auto;
    flex: 1;
}

.markup-tooltip-section {
    padding: 24px;
    border-bottom: 1px solid #f0f0f0;
}

.markup-tooltip-section:last-child {
    border-bottom: none;
}

.markup-tooltip-section h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
}

.markup-tooltip-section h4 i {
    color: #007bff;
    font-size: 18px;
}

.markup-tooltip-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.markup-tooltip-list li {
    padding: 8px 0;
    border-left: 3px solid #e9ecef;
    padding-left: 16px;
    margin-bottom: 8px;
    line-height: 1.5;
    transition: all 0.2s ease;
}

.markup-tooltip-list li:hover {
    border-left-color: #007bff;
    background: #f8f9fa;
    margin-left: -8px;
    padding-left: 24px;
    border-radius: 0 6px 6px 0;
}

.markup-tooltip-list li strong {
    color: #495057;
    font-weight: 600;
}

.markup-tooltip-list li:last-child {
    margin-bottom: 0;
}

/* Help Button Styles */
#markup-creator-help-btn {
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(40, 167, 69, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#markup-creator-help-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(40, 167, 69, 0.6);
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
}

#markup-creator-help-btn:active {
    transform: scale(0.95);
}

/* Multi-select result formats styles */
.markup-creator-result-formats {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.markup-creator-format-option {
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    padding: 5px;
    transition: all 0.2s ease;
    cursor: pointer;
    background: #f8f9fa;
}

.markup-creator-format-option:hover {
    border-color: #007bff;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
}

.markup-creator-format-option:has(input:checked) {
    border-color: #28a745;
    background: #f8fff9;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.15);
}

.markup-creator-checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    margin: 0;
    gap: 12px;
}

.markup-creator-format-checkbox {
    display: none;
}

.markup-creator-format-description {
    font-size: 14px;
    color: #6c757d;
    line-height: 1.4;
    padding-top: 5px;
}

/* Alert panel styles */
#markup-creator-alert-panel {
    border-left: 4px solid #dc3545;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.15);
}

#markup-creator-alert-panel ul {
    padding-left: 20px;
    line-height: 1.6;
}

#markup-creator-alert-panel li {
    margin-bottom: 5px;
}

/* Custom styles for your alert block */
#markup-creator-top-up-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#markup-creator-top-up-section .alert-action {
  flex: 1;
}

#markup-creator-top-up-section .alert-info {
  flex: 1;
}
#markup-creator-top-up-btn {
  margin: 2em 0;
}

/* On medium+ screens, switch to row layout */
@media (min-width: 768px) {
  #markup-creator-top-up-section {
    flex-direction: row;
    align-items: flex-start;
  }
  #markup-creator-top-up-section .alert-action {
    max-width: 50%;
  }
  #markup-creator-top-up-section .alert-info {
    max-width: 50%;
  }
}

/* Prevent body scroll when tooltip is open */
body.markup-tooltip-open {
    overflow: hidden;
}

@media (max-width: 600px) {
    .markup-stats-grid {
        flex-direction: column;
        gap: 10px;
    }

    .markup-stats-item {
        min-width: auto;
    }

    .markup-stats-labels-list {
        justify-content: center;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .markup-tooltip-content {
        width: 95%;
        max-height: 85vh;
        margin: 20px;
    }

    .markup-tooltip-header {
        padding: 16px 20px;
    }

    .markup-tooltip-header h3 {
        font-size: 18px;
    }

    .markup-tooltip-section {
        padding: 20px;
    }

    .markup-tooltip-section h4 {
        font-size: 15px;
    }

    #markup-creator-help-btn {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .markup-tooltip-content {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
        margin: 0;
    }

    .markup-tooltip-section {
        padding: 16px;
    }

    .markup-tooltip-list li {
        font-size: 14px;
    }
}
