/* AI Module Builder - Page Styles */

/* Vera denkt animation text transition */
#ambThinkText {
    transition: opacity 0.3s ease;
}

/* Loading States */
.amb-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 215, 0, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

.amb-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.amb-loading-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.amb-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 215, 0, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 0.8s linear infinite;
}

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

.btn-primary.loading,
.btn-secondary.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn-primary.loading::after,
.btn-secondary.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

/* Error Boundary Styles */
.amb-error-boundary {
    background: #fee;
    border: 2px solid #fcc;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    color: #c33;
}

.amb-error-boundary h3 {
    margin-top: 0;
    color: #c33;
}

.amb-error-boundary button {
    margin-top: 10px;
    padding: 8px 16px;
    background: #c33;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.amb-error-boundary button:hover {
    background: #a22;
}

#printReport {
    display: none !important;
}

.amb-hero {
    padding: 160px 0 60px;
    background: var(--bg-darker);
    position: relative;
}
.amb-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 215, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 215, 0, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
}
.amb-hero-content { position: relative; text-align: center; max-width: 900px; margin: 0 auto; }
.amb-hero-icon {
    width: 100px; height: 100px; margin: 0 auto 24px; border-radius: 24px;
    background: rgba(255, 215, 0, 0.1); border: 2px solid rgba(255, 215, 0, 0.4);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.15);
}
.amb-hero-icon svg {
    color: var(--primary);
    width: 48px;
    height: 48px;
}

/* Progress Indicator */
.amb-progress {
    margin-top: 32px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}
.amb-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
}
.amb-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #ffed4e);
    border-radius: 10px;
    transition: width 0.5s ease;
    width: 12.5%;
}
.amb-progress-text {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    margin: 0;
    font-weight: 500;
}


.amb-builder { background: var(--bg-dark); padding: var(--section-padding) 0; }
.amb-card {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: 20px; padding: 24px; margin-bottom: 24px; box-shadow: var(--shadow-sm);
    box-sizing: border-box; overflow: hidden; word-wrap: break-word;
}
.amb-card-header { margin-bottom: 12px; }
.amb-title { font-family: var(--font-display); font-size: 28px; font-weight: 700; }
.amb-subtitle { color: var(--text-secondary); margin-top: 6px; }
.amb-label { display: block; font-weight: 600; margin-bottom: 8px; }
#roiAutomationVal { color: var(--primary); font-weight: 700; }
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    position: relative;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: 2px solid var(--bg-card);
    box-shadow: 0 2px 6px rgba(255, 215, 0, 0.4);
    position: relative;
    z-index: 2;
}
input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: 2px solid var(--bg-card);
    box-shadow: 0 2px 6px rgba(255, 215, 0, 0.4);
}
input[type="range"] {
    --progress: 60%;
}
input[type="range"]::-webkit-slider-runnable-track {
    background: linear-gradient(to right, var(--primary) 0%, var(--primary) var(--progress, 60%), rgba(255, 255, 255, 0.1) var(--progress, 60%), rgba(255, 255, 255, 0.1) 100%);
    height: 6px;
    border-radius: 3px;
}
input[type="range"]::-moz-range-track {
    background: rgba(255, 255, 255, 0.1);
    height: 6px;
    border-radius: 3px;
}
input[type="range"]::-moz-range-progress {
    background: var(--primary);
    height: 6px;
    border-radius: 3px;
}
input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--primary-light);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.6);
}
input[type="range"]::-moz-range-thumb:hover {
    background: var(--primary-light);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.6);
}
.amb-select, .amb-input, .amb-textarea {
    padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border-color);
    background: #0A0A0A; color: var(--text-primary); outline: none;
    width: 100%; box-sizing: border-box; max-width: 100%;
}
.amb-industry-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.amb-industry-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.amb-pill {
    padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02); color: var(--text-secondary); font-weight: 600;
    cursor: pointer; transition: var(--transition);
}
.amb-pill:hover { border-color: var(--primary); color: var(--primary); }
.amb-pill.active { background: rgba(255, 215, 0, 0.12); border-color: var(--primary); color: var(--primary); }
.amb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 24px; }
@media (max-width: 768px) {
    .amb-grid { grid-template-columns: 1fr; }
}
.amb-search-row, .amb-export-row { display: flex; gap: 12px; align-items: center; margin: 12px 0 16px; flex-wrap: wrap; }
.amb-custom .amb-actions { display: flex; gap: 12px; margin-top: 12px; }

/* KI Vorschläge row spacing tweaks */
.amb-custom .amb-actions { align-items: flex-start; }
#aiSuggestIndustryAddTopBtn { margin-top: 0; }
.amb-arrow-hint { margin: 6px 10px 0 10px; }
.amb-hint {
    margin-top: 12px; padding: 12px 14px; border-radius: 12px;
    background: rgba(255, 215, 0, 0.08); border: 1px dashed var(--primary);
    color: var(--text-secondary); font-size: 14px;
}
.amb-modules { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.amb-module-item {
    display: flex; align-items: flex-start; gap: 12px; border: 1px solid var(--border-color);
    border-radius: 14px; padding: 12px; background: #0A0A0A;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.amb-module-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.1);
}
/* ROI Info Icon Tooltip */
.roi-info-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.4);
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    line-height: 14px;
    cursor: help;
    margin-left: 4px;
    position: relative;
    vertical-align: middle;
    transition: all 0.2s;
}

.roi-info-icon:hover {
    background: rgba(255, 215, 0, 0.25);
    border-color: var(--primary);
    transform: scale(1.1);
}

.roi-info-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 1000;
    max-width: 300px;
    white-space: normal;
    text-align: left;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.roi-info-icon:hover::after {
    opacity: 1;
}

/* Tooltip */
.amb-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.95);
    color: white;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 1000;
    border: 1px solid rgba(255, 215, 0, 0.3);
}
.amb-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.95);
}
.amb-chip:hover .amb-tooltip,
.amb-module-item:hover .amb-tooltip {
    opacity: 1;
}

/* Loading state */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}
.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Undo/Redo button styles */
#undoBtn:not(:disabled),
#redoBtn:not(:disabled) {
    opacity: 1;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
#undoBtn:not(:disabled):hover,
#redoBtn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.15);
}
#undoBtn:disabled,
#redoBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Success feedback */
.amb-feedback {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 20px;
    background: rgba(255, 215, 0, 0.95);
    color: #000;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    animation: slideInUp 0.3s ease;
    display: none;
    border: 1px solid rgba(255, 215, 0, 0.4);
    font-weight: 600;
}
.amb-feedback.show {
    display: block;
}
@keyframes slideInUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
.amb-module-item .info { flex: 1; }
.amb-module-item h4 { font-size: 16px; margin-bottom: 6px; }
.amb-module-item p { color: var(--text-secondary); font-size: 14px; }
.amb-module-actions { display: flex; gap: 8px; }
.amb-selected {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; min-height: 80px; padding: 16px;
    border: 1px dashed var(--border-color); border-radius: 14px; background: rgba(255,255,255,0.02);
    max-height: 600px; overflow-y: auto; margin-bottom: 16px;
}
.amb-chip {
    display: flex; align-items: center; justify-content: flex-start; gap: 8px;
    padding: 12px 14px; border-radius: 12px; background: var(--bg-card); border: 1px solid var(--border-color);
    cursor: grab; box-sizing: border-box; width: 100%; max-width: 100%;
    flex-wrap: nowrap;
    animation: fadeInUp 0.3s ease;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}
.amb-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.15);
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.amb-chip .drag {
    flex-shrink: 0; cursor: grab; color: var(--text-secondary); font-size: 14px;
}
.amb-chip .chip-name {
    flex: 1 1 auto; min-width: 80px; overflow-wrap: break-word; word-wrap: break-word;
    line-height: 1.4;
}
.amb-chip .chip-name .name {
    display: block; overflow-wrap: break-word; word-wrap: break-word;
    white-space: normal; word-break: normal; font-weight: 600;
}
.amb-chip-actions {
    display: flex; gap: 8px; flex-shrink: 0; align-items: center;
}
.amb-chip .detail-btn {
    flex-shrink: 0; white-space: nowrap; font-size: 12px; padding: 6px 10px;
    background: transparent; border: 1px solid var(--border-color);
    border-radius: 8px; color: var(--text-secondary); cursor: pointer;
    transition: all 0.2s ease;
}
.amb-chip .detail-btn:hover {
    border-color: var(--primary); color: var(--primary); background: rgba(255, 215, 0, 0.1);
}
.amb-chip .remove {
    flex-shrink: 0; white-space: nowrap; font-size: 12px; padding: 6px 10px;
    background: transparent; border: 1px solid var(--border-color);
    border-radius: 8px; color: var(--text-secondary); cursor: pointer;
}
.amb-chip .remove:hover { border-color: var(--primary); color: var(--primary); }
.amb-chip.dragging { opacity: .6; border-color: var(--primary); }
.amb-selected-actions { margin-top: 12px; display: flex; gap: 12px; flex-wrap: wrap; }
.amb-recommendation {
    border: 1px solid var(--border-color); border-radius: 14px; padding: 16px; background: #0A0A0A;
    display: flex; flex-direction: column; gap: 12px;
    overflow: hidden; word-wrap: break-word; box-sizing: border-box;
}
.amb-recommendation ol, .amb-recommendation ul {
    overflow-wrap: break-word; word-wrap: break-word; word-break: break-word;
    max-width: 100%; box-sizing: border-box;
}
.amb-recommendation li {
    overflow-wrap: break-word; word-wrap: break-word; word-break: break-word;
    max-width: 100%; box-sizing: border-box;
}
.amb-reco-block {
    padding: 12px; border: 1px solid var(--border-color); border-radius: 12px; background: rgba(255,255,255,0.02);
    overflow: hidden; word-wrap: break-word; box-sizing: border-box;
}
.amb-reco-block h4 { font-size: 16px; margin-bottom: 6px; }
.amb-reco-block p, .amb-reco-block li {
    overflow-wrap: break-word; word-wrap: break-word; word-break: break-word;
    max-width: 100%;
}
.amb-export-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.amb-badge {
    display: inline-block; padding: 4px 8px; border: 1px solid var(--border-color);
    border-radius: 999px; font-size: 12px; color: var(--text-secondary);
}
.amb-arch { margin-top: 16px; display: grid; gap: 12px; }
.amb-arch .phase { border: 1px solid var(--border-color); border-radius: 12px; padding: 12px; background: rgba(255,255,255,0.02); }
.amb-arch .phase h4 { margin-bottom: 6px; font-size: 16px; }

/* Tabs look for industries */
.amb-tabs { border-bottom: 1px solid var(--border-color); padding-bottom: 8px; overflow-x: auto; }
.amb-tabs .amb-pill {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    border-radius: 0;
}
.amb-tabs .amb-pill.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: transparent;
}

/* Simple underline tabs (no icons) */
.amb-tabs-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    width: 100%;
}
.amb-tabs-line .amb-pill {
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-primary);
    border-radius: 12px;
    white-space: nowrap;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.2px;
    padding: 14px 18px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    flex-shrink: 0;
    line-height: 1.4;
}
.amb-tabs-line .amb-pill:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(255, 215, 0, 0.1);
    transform: translateY(-1px);
}
.amb-tabs-line .amb-pill.active {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(255, 215, 0, 0.15);
    font-weight: 700;
}
@media (max-width: 1200px) {
    .amb-tabs-line .amb-pill {
        font-size: 14px;
        padding: 12px 16px;
    }
}
@media (max-width: 768px) {
    /* Hero Section Mobile */
    .amb-hero {
        padding: 100px 0 40px;
    }
    
    .amb-hero-content {
        padding: 0 16px;
    }
    
    .amb-hero-icon {
        width: 80px;
        height: 80px;
        margin-bottom: 20px;
        border-radius: 20px;
    }
    
    .amb-hero-icon svg {
        width: 40px;
        height: 40px;
    }
    
    .amb-progress {
        margin-top: 24px;
        padding: 0 16px;
    }
    
    /* Builder Section Mobile */
    .amb-builder {
        padding: 40px 0;
    }
    
    .amb-builder .container {
        padding: 0 16px;
    }
    
    /* Cards Mobile */
    .amb-card {
        padding: 16px;
        margin-bottom: 16px;
        border-radius: 16px;
    }
    
    .amb-card-header {
        margin-bottom: 16px;
    }
    
    .amb-title {
        font-size: 22px;
        line-height: 1.3;
    }
    
    .amb-subtitle {
        font-size: 14px;
        margin-top: 8px;
    }
    
    .amb-label {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    /* Tabs Mobile */
    .amb-tabs-line .amb-pill {
        font-size: 13px;
        padding: 10px 14px;
    }
    
    .amb-tabs {
        gap: 8px;
    }
    
    .amb-tabs .amb-tile {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    /* Selected Actions Mobile */
    .amb-selected-actions {
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 12px;
    }
    
    .amb-selected-actions button,
    .amb-selected-actions .btn {
        min-width: auto;
        padding: 12px 16px;
        font-size: 13px;
        flex: 1 1 auto;
        min-width: 120px;
        min-height: 44px;
    }
    
    /* Modules Mobile */
    .amb-modules {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .amb-module-item {
        padding: 12px;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .amb-recommendation {
        padding: 12px;
        gap: 10px;
    }
    
    /* Grids Mobile */
    .amb-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 16px;
    }
    
    .amb-roi-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 8px;
    }
    
    .amb-roi-inputs {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    /* Buttons Mobile */
    .btn-primary,
    .btn-secondary {
        padding: 12px 20px;
        font-size: 14px;
        min-height: 44px;
    }
    
    /* Inputs Mobile */
    input[type="text"],
    input[type="number"],
    input[type="email"],
    select,
    textarea {
        padding: 12px 14px;
        font-size: 16px;
        min-height: 44px;
    }
    
    /* Range Slider Mobile */
    input[type="range"] {
        height: 8px;
    }
    
    input[type="range"]::-webkit-slider-thumb {
        width: 24px;
        height: 24px;
    }
    
    /* Chips Mobile */
    .amb-chip {
        padding: 8px 12px;
        font-size: 13px;
        margin: 4px;
    }
    
    /* Modal Mobile */
    .amb-modal-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .amb-modal-content {
        margin: 10px;
        max-width: calc(100vw - 20px);
        border-radius: 12px;
    }
    
    .amb-modal-header {
        padding: 12px 14px;
    }
    
    .amb-modal-body {
        padding: 16px;
        max-height: calc(100vh - 100px);
    }
    
    /* Search and Export Rows Mobile */
    .amb-search-row,
    .amb-export-row {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .amb-search-row input,
    .amb-export-row button {
        width: 100%;
    }
    
    /* Actions Mobile */
    .amb-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .amb-actions button,
    .amb-actions .btn {
        width: 100%;
    }
    
    /* Hint Mobile */
    .amb-hint {
        padding: 10px 12px;
        font-size: 13px;
        margin-top: 10px;
    }
    
    /* Arrow Hint Mobile */
    .amb-arrow-hint {
        display: none;
    }
    
    /* Schritt 7 - Kontaktinformationen Mobile */
    /* Main grid with 0.7fr 0.3fr becomes single column */
    .amb-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Contact form grid becomes single column */
    .amb-card .amb-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    
    /* Schritt 7 Header Mobile */
    .amb-card-header > div {
        flex-wrap: wrap !important;
        gap: 6px !important;
    }
    
    .amb-card-header .amb-title {
        font-size: 20px !important;
        line-height: 1.3 !important;
    }
    
    /* Schritt 7 Button Mobile */
    #requestQuoteBtn {
        width: 100% !important;
        padding: 14px 20px !important;
        font-size: 16px !important;
        min-height: 48px !important;
    }
    
    /* Schritt 8 - Export Mobile */
    /* Export buttons grid becomes single column */
    div[style*="grid-template-columns: repeat(auto-fit"] {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    
    #exportPdfBtn,
    #saveLocalBtn {
        width: 100% !important;
        padding: 12px 16px !important;
        min-height: 48px !important;
        font-size: 14px !important;
    }
    
    /* Schritt 8 Project Name Input Mobile */
    #projectName {
        width: 100% !important;
        padding: 12px 14px !important;
        font-size: 16px !important;
        min-height: 48px !important;
    }
    
    /* Schritt 8 Title Mobile */
    .amb-card .amb-title[style*="font-size: 20px"] {
        font-size: 18px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        max-width: 100% !important;
    }
}

/* Mobile optimizations for small phones */
@media (max-width: 480px) {
    /* Hero Section Small Mobile */
    .amb-hero {
        padding: 80px 0 30px;
    }
    
    .amb-hero-content {
        padding: 0 12px;
    }
    
    .amb-hero-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 16px;
        border-radius: 16px;
    }
    
    .amb-hero-icon svg {
        width: 36px;
        height: 36px;
    }
    
    .amb-progress {
        margin-top: 20px;
        padding: 0 12px;
    }
    
    /* Builder Section Small Mobile */
    .amb-builder {
        padding: 30px 0;
    }
    
    .amb-builder .container {
        padding: 0 12px;
    }
    
    /* Cards Small Mobile */
    .amb-card {
        padding: 12px;
        margin-bottom: 12px;
        border-radius: 12px;
    }
    
    .amb-card-header {
        margin-bottom: 12px;
    }
    
    .amb-title {
        font-size: 20px;
        line-height: 1.3;
    }
    
    .amb-subtitle {
        font-size: 13px;
        margin-top: 6px;
    }
    
    .amb-label {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    /* Selected Actions Small Mobile */
    .amb-selected-actions {
        gap: 6px;
        margin-top: 10px;
    }
    
    .amb-selected-actions button,
    .amb-selected-actions .btn {
        padding: 10px 12px;
        font-size: 12px;
        min-width: 100px;
        flex: 1 1 calc(50% - 3px);
        min-height: 44px;
    }
    
    /* Modules Small Mobile */
    .amb-module-item {
        padding: 10px;
        gap: 8px;
    }
    
    .amb-recommendation {
        padding: 10px;
        gap: 8px;
    }
    
    /* Buttons Small Mobile */
    .btn-primary,
    .btn-secondary {
        padding: 10px 16px;
        font-size: 13px;
        min-height: 44px;
    }
    
    /* Inputs Small Mobile */
    input[type="text"],
    input[type="number"],
    input[type="email"],
    select,
    textarea {
        padding: 10px 12px;
        font-size: 16px;
        min-height: 44px;
    }
    
    /* Tabs Small Mobile */
    .amb-tabs {
        gap: 6px;
    }
    
    .amb-tabs .amb-tile {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    /* Chips Small Mobile */
    .amb-chip {
        padding: 6px 10px;
        font-size: 12px;
        margin: 3px;
    }
    
    /* Modal Small Mobile */
    .amb-modal-content {
        margin: 5px;
        max-width: calc(100vw - 10px);
        border-radius: 10px;
    }
    
    .amb-modal-header {
        padding: 10px 12px;
    }
    
    .amb-modal-body {
        padding: 12px;
        max-height: calc(100vh - 80px);
    }
    
    /* Grids Small Mobile */
    .amb-grid {
        gap: 12px;
        margin-top: 12px;
    }
    
    .amb-roi-grid {
        gap: 12px;
    }
    
    .amb-roi-inputs {
        gap: 10px;
    }
    
    /* Hint Small Mobile */
    .amb-hint {
        padding: 8px 10px;
        font-size: 12px;
        margin-top: 8px;
    }
    
    /* Schritt 7 - Kontaktinformationen Small Mobile */
    .amb-card .amb-grid {
        gap: 10px !important;
    }
    
    /* Schritt 7 Header Small Mobile */
    .amb-card-header .amb-title {
        font-size: 18px !important;
    }
    
    /* Schritt 7 Button Small Mobile */
    #requestQuoteBtn {
        padding: 12px 16px !important;
        font-size: 15px !important;
    }
    
    /* Schritt 8 - Export Small Mobile */
    .amb-card .amb-title[style*="font-size: 20px"] {
        font-size: 16px !important;
    }
    
    /* Schritt 8 Export Buttons Small Mobile */
    #exportPdfBtn,
    #saveLocalBtn {
        padding: 10px 14px !important;
        font-size: 13px !important;
    }
    
    /* Schritt 8 Project Name Input Small Mobile */
    #projectName {
        padding: 10px 12px !important;
        font-size: 16px !important;
    }
}

/* Tile styling for industry buttons */
.amb-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; border-bottom: none; padding-bottom: 0; }
.amb-tabs .amb-tile {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: rgba(255,255,255,0.02);
    padding: 12px 14px;
    color: var(--text-primary);
    font-weight: 600;
}
.amb-tabs .amb-tile::before {
    content: attr(data-emoji);
    display: inline-flex;
    width: 28px; height: 28px;
    align-items: center; justify-content: center;
    border-radius: 8px;
    background: rgba(255, 215, 0, 0.12);
    border: 1px solid var(--primary);
    font-size: 16px;
}
.amb-tabs .amb-tile:hover { border-color: var(--primary); }
.amb-tabs .amb-tile.active {
    background: rgba(255, 215, 0, 0.12);
    border-color: var(--primary);
    color: var(--primary);
}
@media (max-width: 1024px) {
    .amb-tabs { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .amb-tabs { grid-template-columns: 1fr; }
}

/* ROI */
.amb-roi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 8px; }
.amb-roi-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.amb-field { display: flex; flex-direction: column; gap: 6px; }
.amb-roi-results { display: flex; flex-direction: column; gap: 12px; }

/* Modal */
.amb-modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); }
.amb-modal {
    position: fixed; inset: 0; display: none; align-items: center; justify-content: center; z-index: 2000;
}
.amb-modal-content {
    width: min(1600px, 99vw); background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: 16px; box-shadow: var(--shadow-lg); position: relative; max-height: 90vh; overflow: hidden;
    margin: 20px;
    max-width: calc(100vw - 40px);
}
.amb-modal-body .amb-modules {
    grid-template-columns: 1fr;
    gap: 16px;
}
.amb-modal-body .amb-module-item {
    padding: 16px;
    min-width: 0;
}
.amb-modal-body .amb-module-item .info {
    min-width: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
}
.amb-modal-body .amb-module-item .info p {
    word-break: break-word;
    overflow-wrap: break-word;
}
.amb-modal-header {
    display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--border-color);
}
.amb-modal-body { padding: 20px 24px; display: grid; gap: 12px; max-height: calc(90vh - 70px); overflow-y: auto; }
.amb-modal-close {
    background: transparent; border: 1px solid var(--border-color); border-radius: 10px; color: var(--text-secondary);
    padding: 6px 10px; cursor: pointer;
}
.amb-modal-row { display: grid; grid-template-columns: 180px 1fr; gap: 12px; }
.amb-modal-row strong { color: var(--text-secondary); }

.btn-accent {
    background: rgba(0, 194, 255, 0.12);
    border: 1px solid #00C2FF;
    color: #00C2FF;
}
.btn-accent:hover {
    background: rgba(0, 194, 255, 0.18);
    border-color: #29D3FF;
    color: #29D3FF;
}

/* Dark button variant */
.btn-dark {
    background: #000;
    color: #fff;
}
.btn-dark:hover {
    background: #111;
}

/* Keep primary button box, only swap color to black */
.btn-primary.btn-black {
    background: #000 !important;
    color: #fff !important;
}
.btn-primary.btn-black:hover {
    background: #111 !important;
}

/* Disabled button state */
.btn-primary.disabled,
.btn-primary[disabled],
.btn-secondary.disabled,
.btn-secondary[disabled] {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* Black variant for secondary button (keeps same box) */
.btn-secondary.btn-black {
    background: #000 !important;
    color: #fff !important;
    border-color: var(--border-color) !important;
}
.btn-secondary.btn-black:hover {
    background: #111 !important;
}

/* Arrow hint between KI buttons */
.amb-arrow-hint {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px dashed var(--primary);
    color: var(--primary);
    font-weight: 800;
}

.amb-disclaimer {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 6px;
}

/* Responsive */
@media (max-width: 1024px) {
    .amb-grid { grid-template-columns: 1fr; }
    .amb-modules, .amb-selected { grid-template-columns: 1fr; }
    .amb-roi-grid { grid-template-columns: 1fr; }
    .amb-roi-inputs { grid-template-columns: 1fr 1fr; }
}


/* Print for PDF */
@media print {
    @page { size: A4 portrait; margin: 12mm; }
    * { animation: none !important; transition: none !important; }
    body { background: #ffffff !important; color: #000 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    /* Hide app UI, show plain report */
    .navbar, .footer, .amb-hero, .amb-builder, #ambModal { display: none !important; }
    #printReport { display: block !important; }
    #printReport h1, #printReport h2, #printReport h3, #printReport p, #printReport li { color: #000 !important; }
    #printReport h1 { font-size: 22px; margin: 0 0 6px; font-weight: 700; }
    #printReport h2 { font-size: 16px; margin: 14px 0 6px; font-weight: 700; }
    #printReport h3 { font-size: 14px; margin: 10px 0 4px; font-weight: 600; }
    #printReport p, #printReport li { font-size: 13px; line-height: 1.5; }
    #printReport ul, #printReport ol { padding-left: 16px; margin: 6px 0; }
    #printReport > div { margin-bottom: 16px; }
    #printAiRecommendation h3 { margin-top: 8px; }
    #printRoiInputs p { margin: 4px 0; }
    #printContactInfo { display: block !important; }
    #printContactInfo p { margin: 4px 0; }
    #printFooter { margin-top: 32px; padding-top: 16px; border-top: 1px solid #ddd; }
    #printFooter p { margin: 4px 0; }
}

/* Toast animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Module Detail Modal */
.amb-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.amb-modal-overlay.show {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.amb-modal-content {
    background: var(--bg-card);
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

