/* ==========================================================================
   Ausmalfotos Order Flow
   ========================================================================== */

.ausmal-flow {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #333;
    line-height: 1.6;
    max-width: 100%;
}

.ausmal-flow *,
.ausmal-flow *::before,
.ausmal-flow *::after {
    box-sizing: border-box;
}

/* ---------- Progress Bar ---------- */
.ausmal-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 32px 24px;
    max-width: 600px;
    margin: 0 auto 24px;
}

.ausmal-progress__step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.ausmal-progress__number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
    background: #e0e0e0;
    color: #999;
}

.ausmal-progress__step--active .ausmal-progress__number {
    background: var(--wp--preset--color--accent-1, #2e7d32);
    color: #fff;
}

.ausmal-progress__step--done .ausmal-progress__number {
    background: var(--wp--preset--color--accent-2, #c8e6c9);
    color: var(--wp--preset--color--accent-1, #2e7d32);
}

.ausmal-progress__label {
    font-size: 12px;
    color: #999;
    font-weight: 500;
}

.ausmal-progress__step--active .ausmal-progress__label {
    color: var(--wp--preset--color--accent-1, #2e7d32);
    font-weight: 600;
}

.ausmal-progress__step--done .ausmal-progress__label {
    color: var(--wp--preset--color--accent-1, #2e7d32);
}

.ausmal-progress__line {
    flex: 1;
    height: 2px;
    background: #e0e0e0;
    margin: 0 8px;
    margin-bottom: 22px;
}

.ausmal-progress__line--done {
    background: var(--wp--preset--color--accent-2, #c8e6c9);
}

/* ---------- Flow Content ---------- */
.ausmal-flow__content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px 60px;
}

.ausmal-flow__title {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px;
}

.ausmal-flow__subtitle {
    text-align: center;
    font-size: 16px;
    color: #666;
    margin: 0 0 32px;
}

.ausmal-flow__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 32px;
}

.ausmal-flow__count {
    font-size: 15px;
    color: #666;
    margin: 0;
}

/* ---------- Back Link ---------- */
.ausmal-flow__back {
    text-align: center;
    margin: 0 0 16px;
}

.ausmal-flow__back a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.ausmal-flow__back a:hover {
    color: var(--wp--preset--color--accent-1, #2e7d32);
}

/* ---------- Buttons ---------- */
.ausmal-flow .ausmal-btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    border: none;
}

.ausmal-flow .ausmal-btn--primary {
    background: var(--wp--preset--color--accent-1, #2e7d32);
    color: #fff;
}

.ausmal-flow .ausmal-btn--primary:hover {
    background: var(--wp--preset--color--accent-3, #1b5e20);
    transform: translateY(-1px);
    color: #fff;
}

.ausmal-flow .ausmal-btn--primary:disabled {
    background: #aaa;
    cursor: not-allowed;
    transform: none;
}

.ausmal-flow .ausmal-btn--secondary {
    background: none;
    color: #666;
    padding: 10px 24px;
}

.ausmal-flow .ausmal-btn--secondary:hover {
    color: #333;
}

.ausmal-flow .ausmal-btn--large {
    padding: 16px 40px;
    font-size: 17px;
    width: 100%;
    max-width: 400px;
}

/* ---------- Dropzone ---------- */
.ausmal-dropzone {
    border: 2px dashed #ccc;
    border-radius: 12px;
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    background: #fafafa;
    transition: border-color 0.2s, background 0.2s;
    margin-top: 24px;
}

.ausmal-dropzone--active,
.ausmal-dropzone:hover {
    border-color: var(--wp--preset--color--accent-1, #2e7d32);
    background: var(--wp--preset--color--accent-5, #f0faf0);
}

.ausmal-dropzone__label svg {
    color: #bbb;
    margin-bottom: 12px;
}

.ausmal-dropzone__label p {
    margin: 0;
    color: #888;
    font-size: 15px;
}

.ausmal-dropzone__link {
    color: var(--wp--preset--color--accent-1, #2e7d32);
    text-decoration: underline;
    cursor: pointer;
}

.ausmal-dropzone__hint {
    font-size: 13px;
    color: #aaa;
    margin-top: 4px;
}

/* ---------- Photo Grid (legacy, kept for compatibility) ---------- */
.ausmal-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.ausmal-photo-thumb {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
}

.ausmal-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ausmal-photo-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ---------- Upload Progress ---------- */
.ausmal-upload-bar-wrap {
    margin-top: 16px;
}

.ausmal-upload-bar {
    background: #eee;
    border-radius: 6px;
    height: 6px;
    overflow: hidden;
}

.ausmal-upload-bar__fill {
    background: var(--wp--preset--color--accent-1, #2e7d32);
    height: 100%;
    width: 0%;
    transition: width 0.3s;
}

.ausmal-upload-bar__text {
    font-size: 13px;
    color: #666;
    margin: 6px 0 0;
}

/* ---------- Preview (legacy, kept for compatibility) ---------- */
.ausmal-preview-loading {
    text-align: center;
    padding: 80px 24px;
}

.ausmal-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e0e0e0;
    border-top-color: var(--wp--preset--color--accent-1, #2e7d32);
    border-radius: 50%;
    animation: ausmal-spin 0.8s linear infinite;
    margin: 0 auto 24px;
}

@keyframes ausmal-spin {
    to { transform: rotate(360deg); }
}

.ausmal-preview-compare {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin: 32px 0;
}

.ausmal-preview-compare__item {
    text-align: center;
    flex: 1;
    max-width: 320px;
}

.ausmal-preview-compare__item img {
    width: 100%;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
}

.ausmal-preview-compare__label {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
}

.ausmal-preview-compare__arrow {
    font-size: 32px;
    color: var(--wp--preset--color--accent-1, #2e7d32);
    font-weight: 700;
    flex-shrink: 0;
}

.ausmal-preview-error {
    text-align: center;
    padding: 60px 24px;
}

/* ---------- Configure ---------- */
.ausmal-config-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 24px 0;
}

.ausmal-config-card {
    cursor: pointer;
}

.ausmal-config-card input {
    display: none;
}

.ausmal-config-card__inner {
    border: 2px solid #e0e0e0;
    border-radius: 14px;
    padding: 28px 20px;
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s;
    position: relative;
}

.ausmal-config-card input:checked + .ausmal-config-card__inner {
    border-color: var(--wp--preset--color--accent-1, #2e7d32);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.15);
}

.ausmal-config-card__badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--wp--preset--color--accent-1, #2e7d32);
    color: #fff;
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.ausmal-config-card__pages {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.ausmal-config-card__price {
    font-size: 28px;
    font-weight: 800;
    color: var(--wp--preset--color--accent-1, #2e7d32);
    margin-bottom: 4px;
}

.ausmal-config-card__desc {
    font-size: 13px;
    color: #888;
}

.ausmal-config-hint {
    text-align: center;
    font-size: 14px;
    color: #f57c00;
    background: #fff8e1;
    padding: 10px 16px;
    border-radius: 8px;
}

/* ---------- Auth ---------- */
.ausmal-auth-wrap {
    max-width: 440px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
}

.ausmal-auth-tabs {
    display: flex;
    border-bottom: 2px solid #eee;
}

.ausmal-auth-tab {
    flex: 1;
    padding: 14px;
    border: none;
    background: none;
    font-size: 15px;
    cursor: pointer;
    color: #888;
    font-weight: 500;
    transition: color 0.2s;
}

.ausmal-auth-tab--active {
    color: var(--wp--preset--color--accent-1, #2e7d32);
    font-weight: 600;
    border-bottom: 2px solid var(--wp--preset--color--accent-1, #2e7d32);
    margin-bottom: -2px;
}

.ausmal-auth-panel {
    padding: 28px;
}

.ausmal-auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ausmal-form-row label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
}

.ausmal-form-row input[type="text"],
.ausmal-form-row input[type="email"],
.ausmal-form-row input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    box-sizing: border-box;
}

.ausmal-form-row input:focus {
    border-color: var(--wp--preset--color--accent-1, #2e7d32);
    outline: none;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.ausmal-form-row--checkbox label {
    font-weight: 400;
    font-size: 13px;
    color: #666;
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.ausmal-form-row--checkbox input {
    margin-top: 3px;
}

.ausmal-auth-error {
    color: #c62828;
    font-size: 14px;
    margin: 0;
    padding: 8px 12px;
    background: #ffebee;
    border-radius: 6px;
}

.ausmal-auth-forgot {
    text-align: center;
    font-size: 13px;
    margin: 8px 0 0;
}

.ausmal-auth-forgot a {
    color: #888;
}

.ausmal-auth-hint {
    font-size: 13px;
    color: #888;
}

/* ---------- Modal ---------- */
.ausmal-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ausmal-modal__backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.ausmal-modal__content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    max-width: 480px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.ausmal-modal__content h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px;
}

.ausmal-modal__content p {
    font-size: 15px;
    color: #666;
    margin: 0 0 24px;
}

.ausmal-modal__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

/* ---------- RESPONSIVE (existing) ---------- */
@media (max-width: 768px) {
    .ausmal-flow__title {
        font-size: 24px;
    }

    .ausmal-preview-compare {
        flex-direction: column;
        gap: 12px;
    }

    .ausmal-preview-compare__arrow {
        transform: rotate(90deg);
    }

    .ausmal-config-options {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .ausmal-progress__label {
        font-size: 11px;
    }

    .ausmal-progress__number {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
}

/* ==========================================================================
   NEW STYLES: Combined Upload + Preview Page
   ========================================================================== */

/* ---------- Sticky "Jetzt bestellen" Bar ---------- */
.ausmal-sticky-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 12px 24px;
    margin-bottom: 24px;
}

.ausmal-sticky-bar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 800px;
    margin: 0 auto;
    gap: 16px;
}

.ausmal-sticky-bar__count {
    font-size: 14px;
    font-weight: 500;
    color: #666;
}

.ausmal-sticky-bar .ausmal-btn {
    padding: 10px 24px;
    font-size: 15px;
    white-space: nowrap;
}

/* ---------- Hero Preview Section ---------- */
.ausmal-hero-preview {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 32px 24px;
    margin-bottom: 24px;
    border: 1px solid #e8e8e8;
}

.ausmal-hero-preview__loading {
    text-align: center;
    padding: 40px 0;
}

.ausmal-hero-preview__loading .ausmal-spinner {
    width: 40px;
    height: 40px;
}

.ausmal-hero-preview__loading p {
    color: #888;
    font-size: 15px;
    margin: 0;
}

.ausmal-hero-preview__title {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 4px;
}

.ausmal-hero-preview__hint {
    text-align: center;
    font-size: 13px;
    color: #999;
    margin: 0 0 24px;
}

.ausmal-hero-preview__compare {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.ausmal-hero-preview__side {
    text-align: center;
    flex: 1;
    max-width: 300px;
}

.ausmal-hero-preview__side img {
    width: 100%;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    display: block;
}

.ausmal-hero-preview__label {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
}

.ausmal-hero-preview__arrow {
    font-size: 28px;
    color: var(--wp--preset--color--accent-1, #2e7d32);
    font-weight: 700;
    flex-shrink: 0;
}

.ausmal-hero-preview__actions {
    text-align: center;
    margin-bottom: 12px;
}

.ausmal-hero-preview__regenerate {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--wp--preset--color--accent-1, #2e7d32);
    background: var(--wp--preset--color--accent-5, #f0faf0);
    border: 1px solid var(--wp--preset--color--accent-2, #c8e6c9);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.ausmal-hero-preview__regenerate:hover {
    background: var(--wp--preset--color--accent-2, #c8e6c9);
    border-color: var(--wp--preset--color--accent-1, #2e7d32);
}

.ausmal-hero-preview__regenerate:disabled {
    background: #f5f5f5;
    color: #aaa;
    border-color: #ddd;
    cursor: not-allowed;
}

/* ---------- Version Thumbnails ---------- */
.ausmal-hero-preview__versions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
}

.ausmal-hero-preview__version-thumb {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border: 2px solid transparent;
    border-radius: 8px;
    background: none;
    cursor: pointer;
    transition: border-color 0.2s;
}

.ausmal-hero-preview__version-thumb img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.ausmal-hero-preview__version-thumb span {
    font-size: 11px;
    font-weight: 600;
    color: #888;
}

.ausmal-hero-preview__version-thumb--active {
    border-color: var(--wp--preset--color--accent-1, #2e7d32);
}

.ausmal-hero-preview__version-thumb--active span {
    color: var(--wp--preset--color--accent-1, #2e7d32);
}

.ausmal-hero-preview__error {
    text-align: center;
    padding: 24px 0;
}

.ausmal-hero-preview__error p {
    color: #c62828;
    font-size: 14px;
    margin: 0;
}

/* ---------- Photo List (compact rows) ---------- */
.ausmal-photo-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

/* ---------- Photo Row (compact list for photo 2+) ---------- */
.ausmal-photo-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 1px solid #eee;
    border-radius: 12px;
    margin-bottom: 12px;
    transition: box-shadow 0.2s;
    position: relative;
}

.ausmal-photo-row:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.ausmal-photo-row__original {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid #e0e0e0;
}

.ausmal-photo-row__original img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ausmal-photo-row__arrow {
    color: #ccc;
    font-size: 20px;
    flex-shrink: 0;
}

.ausmal-photo-row__converted {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.ausmal-photo-row__placeholder {
    width: 100%;
    height: 100%;
    background: #f0f0f0;
    border: 2px dashed #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ausmal-photo-row__placeholder::after {
    content: '';
    width: 32px;
    height: 32px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24' fill='none' stroke='%23ccc' stroke-width='1.5'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Cpath d='M3 16l5-5 4 4 4-4 5 5'/%3E%3Ccircle cx='9' cy='9' r='1.5'/%3E%3C/svg%3E") center/contain no-repeat;
}

.ausmal-photo-row__info {
    flex: 1;
    min-width: 0;
}

.ausmal-photo-row__name {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ausmal-photo-row__status {
    font-size: 13px;
    color: #999;
    margin-top: 2px;
}

.ausmal-photo-row__actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.ausmal-photo-row__action {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
    padding: 0;
}

.ausmal-photo-row__action:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.ausmal-photo-row__action--disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.ausmal-photo-row__action--disabled:hover {
    background: #fff;
    border-color: #e0e0e0;
}

.ausmal-photo-row__action--delete:hover {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #dc2626;
}

/* Hover overlay for "Jetzt bestellen" */
.ausmal-photo-row__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(46, 125, 50, 0.85);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    cursor: pointer;
}

.ausmal-photo-row:hover .ausmal-photo-row__overlay {
    opacity: 1;
    pointer-events: auto;
}

.ausmal-photo-row__overlay-text {
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ausmal-photo-row__overlay-text svg {
    width: 20px;
    height: 20px;
}
    .ausmal-hero-preview__version-thumb img {
        width: 48px;
        height: 48px;
    }
}
