.ai-print-wrapper {
    max-width: 720px;
    margin: 2rem auto;
    padding: 1.5rem;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ai-print-field {
    margin-bottom: 1.25rem;
}

.ai-print-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.ai-print-field input[type="file"],
.ai-print-field select,
.ai-print-field textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 0.95rem;
    box-sizing: border-box;
}

.ai-print-field textarea {
    resize: vertical;
    min-height: 80px;
}

.ai-print-button,
.ai-print-order-button {
    display: inline-block;
    padding: 0.7rem 1.3rem;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #6366f1, #ec4899);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.2);
    transition: transform 0.1s ease, box-shadow 0.1s ease, opacity 0.1s ease;
}

.ai-print-button:hover,
.ai-print-order-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(99, 102, 241, 0.25);
}

.ai-print-button:disabled,
.ai-print-order-button:disabled {
    opacity: 0.6;
    cursor: default;
    box-shadow: none;
}

.ai-print-result {
    margin-top: 1.5rem;
    text-align: center;
}

.ai-print-loading {
    color: #4b5563;
    font-style: italic;
}

.ai-print-error {
    color: #b91c1c;
    font-weight: 500;
}

.ai-print-preview-wrapper {
    margin-top: 1rem;
}

.ai-print-preview-image {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
    margin-bottom: 1rem;
}

.ai-print-message {
    margin-bottom: 0.75rem;
    color: #374151;
}

.ai-print-before-after {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    align-items: flex-start;
    margin-top: 1rem;
}

.ai-print-col {
    flex: 1 1 260px;
    text-align: center;
}

.ai-print-col-empty {
    opacity: 0.7;
}

.ai-print-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #111827;
}

.ai-print-placeholder {
    color: #6b7280;
    font-style: italic;
}

.ai-print-debug {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    text-align: left;
    max-height: 320px;
    overflow: auto;
}

.ai-print-debug-pre {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #111827;
    color: #f9fafb;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Editor overlay */
.ai-print-editor-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.ai-print-editor-inner {
    width: min(1000px, 100%);
    max-height: 90vh;
    background: #0f172a;
    border-radius: 16px;
    padding: 1rem 1rem 0.75rem;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.65);
    display: flex;
    flex-direction: column;
}

.ai-print-editor-body {
    flex: 1 1 auto;
    min-height: 420px;
}

.ai-print-editor-container {
    width: 100%;
    height: 100%;
}

.ai-print-editor-close {
    align-self: flex-end;
    border: none;
    background: transparent;
    color: #e5e7eb;
    font-size: 1.6rem;
    cursor: pointer;
    padding: 0.15rem 0.5rem;
}

.ai-print-editor-close:hover {
    color: #ffffff;
}

.ai-print-editor-actions {
    margin-top: 0.75rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.ai-print-edit-button {
    margin-right: 0.5rem;
    background: transparent;
    color: #4b5563;
    box-shadow: none;
    border: 1px solid #d1d5db;
}

.ai-print-edit-button:hover {
    background: #f9fafb;
}

