/* ===== PRODUCT CREATOR (DASHBOARD STATISCH) ===== */
.creater-form {
    display: flex;
    gap: 20px;
}

.left-creator-container,
.right-creator-container {
    width: 100%;
    height: 100%;
}

/* Container für die gesamte Sektion */
#section-product-creator .form-group {
    margin-bottom: 16px;
}

#section-product-creator .form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 4px;
}

#section-product-creator .form-row .form-group {
    margin-bottom: 0;
}

#section-product-creator .form-row.full-width {
    grid-template-columns: 1fr;
}

#section-product-creator label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

#section-product-creator input[type="text"],
#section-product-creator input[type="number"],
#section-product-creator textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: 0.2s;
    box-sizing: border-box;
}

#section-product-creator input:focus,
#section-product-creator textarea:focus {
    border-color: var(--accent-violet);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

/* ===== INPUT WITH COUNTER ===== */
#section-product-creator .input-with-counter {
    position: relative;
}

#section-product-creator .input-with-counter input,
#section-product-creator .input-with-counter textarea {
    width: 100%;
    padding-right: 60px;
}

#section-product-creator .char-counter {
    position: absolute;
    right: 12px;
    bottom: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
    pointer-events: none;
}

/* ===== CUSTOM DROPDOWN ===== */
#section-product-creator .custom-dropdown .dropdown-trigger {
    background: var(--bg-card);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: 0.2s;
    color: var(--text-primary);
}

#section-product-creator .custom-dropdown .dropdown-trigger:hover {
    border-color: var(--accent-violet);
}

#section-product-creator .custom-dropdown .dropdown-list {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 10px;
    padding: 4px 0;
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
}

#section-product-creator .custom-dropdown.open .dropdown-list {
    display: block;
}

#section-product-creator .custom-dropdown .dropdown-item {
    padding: 8px 14px;
    cursor: pointer;
    transition: 0.2s;
    color: var(--text-primary);
}

#section-product-creator .custom-dropdown .dropdown-item:hover {
    background: rgba(139, 92, 246, 0.1);
}

/* ===== RADIO BUTTONS ===== */
#section-product-creator .product-type-radio-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 4px;
}

#section-product-creator .product-type-card {
    border: 2px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-card);
    position: relative;
}

#section-product-creator .product-type-card:hover {
    border-color: var(--accent-violet);
    background: rgba(139, 92, 246, 0.05);
}

#section-product-creator .product-type-card input[type="radio"]:checked+.radio-mark+.radio-content {
    border-color: var(--accent-violet);
}

#section-product-creator .product-type-card input[type="radio"]:checked~.radio-content {
    background: rgba(139, 92, 246, 0.08);
}

#section-product-creator .custom-radio {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
    cursor: pointer;
}

#section-product-creator .custom-radio input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

#section-product-creator .custom-radio .radio-mark {
    position: relative;
    flex-shrink: 0;
    height: 20px;
    width: 20px;
    background: var(--bg-card);
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 50%;
    transition: 0.2s;
    margin-top: 2px;
}

#section-product-creator .custom-radio input:checked~.radio-mark {
    border-color: var(--accent-violet);
    background: var(--accent-violet);
}

#section-product-creator .custom-radio .radio-mark::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    display: none;
}

#section-product-creator .custom-radio input:checked~.radio-mark::after {
    display: block;
}

#section-product-creator .custom-radio .radio-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#section-product-creator .custom-radio .radio-icon {
    font-size: 1.5rem;
}

#section-product-creator .custom-radio .radio-label {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

#section-product-creator .custom-radio .radio-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===== UPLOAD ZONES ===== */
#section-product-creator .upload-section {
    margin-top: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

#section-product-creator .upload-zone {
    border: 2px dashed rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
    background: var(--bg-card);
    position: relative;
    flex: 1;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#section-product-creator .upload-zone:hover {
    border-color: var(--accent-violet);
    background: rgba(139, 92, 246, 0.05);
}

#section-product-creator .upload-zone.dragover {
    border-color: var(--accent-violet);
    background: rgba(139, 92, 246, 0.1);
}

#section-product-creator .upload-placeholder .upload-icon {
    font-size: 28px;
    display: block;
    margin-bottom: 4px;
}

#section-product-creator .upload-placeholder span {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
}

#section-product-creator .upload-placeholder .upload-hint {
    font-size: 0.75rem;
    color: #666;
    margin-top: 2px;
}

#section-product-creator .upload-counter {
    text-align: right;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

#section-product-creator .upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    width: 100%;
    max-height: 150px;
    overflow-y: auto;
    overflow-x: hidden;
}

#section-product-creator .upload-preview::-webkit-scrollbar {
    width: 4px;
}

#section-product-creator .upload-preview::-webkit-scrollbar-track {
    background: transparent;
}

#section-product-creator .upload-preview::-webkit-scrollbar-thumb {
    background: var(--accent-violet);
    border-radius: 2px;
}

#section-product-creator .upload-preview {
    scrollbar-width: thin;
    scrollbar-color: var(--accent-violet) transparent;
}

#section-product-creator .upload-preview-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-secondary);
    border: 1px solid rgba(139, 92, 246, 0.1);
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
    width: 100%;
}

#section-product-creator .upload-preview-item img {
    width: 24px;
    height: 24px;
    object-fit: cover;
    border-radius: 4px;
}

#section-product-creator .upload-preview-item .file-icon {
    font-size: 18px;
}

#section-product-creator .upload-preview-item .file-name {
    width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: justify;
    margin-right: auto;
}

#section-product-creator .upload-preview-item .file-size {
    font-size: 0.7rem;
    color: #666;
    width: 55px;
    text-align: end;
}

#section-product-creator .upload-preview-meta {
    width: 70px;
}

.image-thumbnail {
    width: 70px !important;
}

#section-product-creator .upload-preview-meta .custom-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    position: relative;
    padding-left: 20px;
    user-select: none;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin: 0;
}

#section-product-creator .upload-preview-meta .custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

#section-product-creator .upload-preview-meta .custom-checkbox .checkmark {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 14px;
    width: 14px;
    background: var(--bg-card);
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 3px;
    transition: 0.2s;
}

#section-product-creator .upload-preview-meta .custom-checkbox input:checked~.checkmark {
    background: var(--accent-violet);
    border-color: var(--accent-violet);
}

#section-product-creator .upload-preview-meta .custom-checkbox .checkmark::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 7px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    display: none;
}

.image-info {
    display: flex;
    text-align: left;
}

#section-product-creator .upload-preview-meta .custom-checkbox input:checked~.checkmark::after {
    display: block;
}

#section-product-creator .upload-preview-meta .custom-checkbox:hover .checkmark {
    border-color: var(--accent-violet);
}

/* ===== AI INFO ===== */
#section-product-creator .ai-upload-info {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

#section-product-creator .allowed-types {
    color: var(--accent-pink);
}

#section-product-creator .tooltip-container {
    position: relative;
    display: inline-block;
}

#section-product-creator .tooltip-trigger {
    color: var(--accent-pink);
    text-decoration: underline;
    cursor: help;
    font-weight: 600;
}

#section-product-creator .tooltip-trigger:hover {
    color: var(--accent-violet);
}

#section-product-creator .tooltip-text {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--accent-pink);
    font-size: 0.8rem;
    font-weight: 400;
    white-space: normal;
    width: 250px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 100;
    text-align: center;
    line-height: 1.4;
}

#section-product-creator .tooltip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--accent-pink);
}

#section-product-creator .tooltip-container:hover .tooltip-text {
    opacity: 1;
    visibility: visible;
}

/* ===== REMOVE BUTTON ===== */
#section-product-creator .remove-upload {
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 14px;
    padding: 0 4px;
    transition: 0.2s;
}

#section-product-creator .remove-upload:hover {
    color: #f87171;
}

/* ===== FORM ACTIONS ===== */
#section-product-creator .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid rgba(139, 92, 246, 0.1);
}

#section-product-creator .btn-primary {
    background: var(--accent-violet);
    color: #fff;
    border: none;
    padding: 10px 30px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

#section-product-creator .btn-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

#section-product-creator .btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid rgba(139, 92, 246, 0.2);
    padding: 10px 30px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

#section-product-creator .btn-secondary:hover {
    border-color: var(--accent-violet);
}

/* ===== CUSTOM CHECKBOX ===== */
#section-product-creator .custom-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    position: relative;
    padding-left: 28px;
    user-select: none;
    color: var(--text-muted);
    font-size: 0.95rem;
}

#section-product-creator .custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

#section-product-creator .custom-checkbox .checkmark {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    width: 20px;
    background: var(--bg-card);
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 4px;
    transition: 0.2s;
}

#section-product-creator .custom-checkbox input:checked~.checkmark {
    background: var(--accent-violet);
    border-color: var(--accent-violet);
}

#section-product-creator .custom-checkbox .checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    display: none;
}

#section-product-creator .custom-checkbox input:checked~.checkmark::after {
    display: block;
}

#section-product-creator .custom-checkbox:hover .checkmark {
    border-color: var(--accent-violet);
}

/* ===== DYNAMIC SUB-FORMS ===== */
#section-product-creator .product-type-fields {
    margin-top: 16px;
    padding: 16px;
    border: 1px solid rgba(139, 92, 246, 0.1);
    border-radius: 12px;
    background: var(--bg-card);
}

#section-product-creator .product-type-fields h3 {
    font-size: 1.1rem;
    margin: 0 0 12px 0;
    color: var(--text-primary);
}

#section-product-creator .product-type-fields .required {
    color: var(--accent-pink);
}

#section-product-creator .product-type-fields .optional {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 400;
}

#section-product-creator .file-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

#section-product-creator .file-input-wrapper input[type="file"] {
    flex: 1;
    padding: 8px;
    background: var(--bg-secondary);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
}

#section-product-creator .file-input-wrapper input[type="file"]::file-selector-button {
    padding: 6px 16px;
    background: var(--accent-violet);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
}

#section-product-creator .file-input-wrapper input[type="file"]::file-selector-button:hover {
    opacity: 0.9;
}

.upload-icon.file-icon {
    width: 50px;
    height: auto;
}

.creator-file-types img {
    padding: 10px;
    height: 80px;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.result-form-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
}

#full-ui-assets-preview-container {
    width: 240px;
}

#dynamic-product-fields {
    height: 100%;
}

.creator-actions {
    display: flex;
    justify-content: end;
    margin-top: 20px;
}

section {
    height: unset;
    display: unset;
    align-items: unset;
}

.progress-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.65);
}

.progress-modal {
    min-width: 320px;
    padding: 32px;
    border-radius: 12px;
    background: #161A1F;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.progress-spinner {
    width: 42px;
    height: 42px;
    margin: 0 auto 20px;
    border: 4px solid rgba(255, 255, 255, 0.15);
    border-top-color: #fff;
    border-radius: 50%;
    animation: progress-spin 0.8s linear infinite;
}

.progress-message {
    color: #fff;
    font-size: 14px;
}

.progress-modal-icon {
    width: 100px;
    height: 100px;
}

.horum-images {
    position: relative;
    width: 100px;
    height: 100px;
    margin-bottom: 16px;
}

.horum-images img {
    position: absolute;
    inset: 0;
    object-fit: contain;
}

.horum-image-01 {
    z-index: 1;
}

.horum-image-02 {
    z-index: 2;
    animation: horumPulse 1.8s ease-in-out infinite;
}

@keyframes horumPulse {
    0%, 100% {
        opacity: 0;
        filter:
            drop-shadow(0 0 0 rgba(0, 210, 255, 0))
            brightness(1);
    }

    50% {
        opacity: 1;
        filter:
            drop-shadow(0 0 8px rgba(255, 0, 0, 0.9))
            drop-shadow(0 0 18px rgba(255, 0, 0, 0.7))
            brightness(1.5);
    }
}

@keyframes progress-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
    #section-product-creator .form-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    #section-product-creator .form-row .form-group {
        margin-bottom: 12px;
    }

    #section-product-creator .product-type-radio-group {
        grid-template-columns: 1fr;
    }

    #section-product-creator .upload-zone {
        min-height: 100px;
        padding: 12px;
    }

    #section-product-creator .upload-preview-item {
        font-size: 0.75rem;
    }

    #section-product-creator .upload-preview-item img {
        width: 24px;
        height: 24px;
    }

    #section-product-creator .form-actions {
        flex-direction: column;
    }

    #section-product-creator .form-actions button {
        width: 100%;
    }
}