/* =========================================
   CONTAINER
   ========================================= */
.aiq-container {
    max-width: 860px;
    margin: 0 auto;
    padding: 36px 32px;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    color: #2d2d2d;
}

/* =========================================
   STEP INDICATOR
   ========================================= */
.aiq-steps-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 36px;
}

.aiq-step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.aiq-step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, color 0.3s;
}

.aiq-step-item.active .aiq-step-circle {
    background: #0073aa;
    color: #fff;
}

.aiq-step-item.done .aiq-step-circle {
    background: #28a745;
    color: #fff;
}

.aiq-step-label {
    font-size: 12px;
    color: #999;
    font-weight: 500;
    transition: color 0.3s;
}

.aiq-step-item.active .aiq-step-label {
    color: #0073aa;
    font-weight: 600;
}

.aiq-step-item.done .aiq-step-label {
    color: #28a745;
}

.aiq-step-line {
    flex: 1;
    height: 2px;
    background: #e0e0e0;
    margin: 0 10px;
    margin-bottom: 22px;
    transition: background 0.3s;
}

.aiq-step-line.done {
    background: #28a745;
}

/* =========================================
   TYPOGRAPHY
   ========================================= */
.aiq-step h2 {
    text-align: center;
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: 0.5px;
    padding-top: 4px;
}

.aiq-subtitle {
    text-align: center;
    color: #777;
    font-size: 15px;
    margin: 0 0 24px;
}

.aiq-hint {
    text-align: center;
    color: #999;
    font-size: 13px;
    margin: 0 0 16px;
    font-style: italic;
}

.aiq-optional {
    font-weight: 400;
    color: #999;
    font-size: 13px;
}

/* =========================================
   FORM FIELDS
   ========================================= */
.aiq-form-group {
    margin-bottom: 18px;
}

.aiq-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
    color: #444;
}

.aiq-form-group input,
.aiq-form-group select,
.aiq-form-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 15px;
    color: #2d2d2d;
    background: #fafafa;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    outline: none;
}

.aiq-form-group input:focus,
.aiq-form-group select:focus,
.aiq-form-group textarea:focus {
    border-color: #0073aa;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.12);
}

.aiq-form-group input::placeholder,
.aiq-form-group textarea::placeholder {
    color: #bbb;
}

/* Radio buttons */
.aiq-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}

.aiq-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    color: #555;
    background: #fafafa;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.aiq-radio-label:hover {
    border-color: #0073aa;
    background: #f0f8ff;
    color: #0073aa;
}

.aiq-radio-label input[type="radio"] {
    width: auto;
    margin: 0;
    accent-color: #0073aa;
}

/* =========================================
   BUTTONS
   ========================================= */
.aiq-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #0073aa;
    color: #fff;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s, opacity 0.2s;
}

.aiq-btn:hover {
    background: #005f8d;
}

.aiq-btn:active {
    transform: scale(0.98);
}

.aiq-btn:disabled {
    background: #c8d0d8;
    cursor: not-allowed;
    transform: none;
    opacity: 0.7;
}

.aiq-btn-secondary {
    background: #6c757d;
}

.aiq-btn-secondary:hover {
    background: #545b62;
}

.aiq-btn-full {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    margin-top: 8px;
}

.aiq-badge {
    display: inline-block;
    background: rgba(255,255,255,0.25);
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 600;
}

/* =========================================
   ERROR MESSAGES
   ========================================= */
.aiq-error {
    background: #fff2f2;
    border: 1px solid #f5c6cb;
    color: #c0392b;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 500;
}

/* =========================================
   IMAGE GRID
   ========================================= */
.aiq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.aiq-image-card {
    border: 3px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.aiq-image-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.aiq-image-card.selected {
    border-color: #0073aa;
    box-shadow: 0 0 0 4px rgba(0, 115, 170, 0.2);
}

.aiq-image-card.selected::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    background: #0073aa;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

.aiq-image-card img {
    width: 100%;
    height: auto;
    display: block;
}

/* =========================================
   CONTROLS
   ========================================= */
.aiq-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.aiq-edit-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

/* =========================================
   IMAGE PREVIEWS
   ========================================= */
.aiq-edit-preview,
.aiq-final-preview {
    text-align: center;
    margin-bottom: 24px;
}

.aiq-edit-preview img,
.aiq-final-preview img {
    max-width: 420px;
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* =========================================
   SLIDERS
   ========================================= */
.aiq-slider-wrapper {
    width: 100%;
    margin-bottom: 20px;
}

.aiq-slider-wrapper label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #444;
}

.aiq-slider-wrapper label span {
    font-weight: 700;
    color: #0073aa;
    min-width: 36px;
    text-align: right;
}

.aiq-slider-wrapper input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    accent-color: #0073aa;
    cursor: pointer;
}

/* =========================================
   LOADING
   ========================================= */
#aiq-step-loading {
    text-align: center;
    padding: 60px 20px;
}

.aiq-spinner {
    border: 4px solid #e8e8e8;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    animation: aiq-spin 0.9s linear infinite;
    margin: 0 auto 24px;
}

@keyframes aiq-spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#aiq-loading-message {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.aiq-loading-hint {
    font-size: 13px;
    color: #aaa;
    margin-bottom: 24px;
}

.aiq-progress-bar-container {
    width: 100%;
    max-width: 360px;
    height: 6px;
    background: #e8e8e8;
    border-radius: 3px;
    margin: 0 auto;
    overflow: hidden;
}

.aiq-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #0073aa, #00a0d2);
    width: 0%;
    animation: aiq-progress 2.5s ease-in-out infinite;
    border-radius: 3px;
}

@keyframes aiq-progress {
    0%   { width: 0%; }
    60%  { width: 75%; }
    100% { width: 95%; }
}

/* =========================================
   SUCCESS
   ========================================= */
.aiq-success-icon {
    width: 64px;
    height: 64px;
    background: #28a745;
    color: #fff;
    border-radius: 50%;
    font-size: 28px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

#aiq-step-success {
    text-align: center;
    padding: 20px 0;
}

#aiq-step-success .aiq-final-preview {
    margin-top: 24px;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 600px) {
    .aiq-container {
        padding: 24px 16px;
    }

    .aiq-step-label {
        display: none;
    }

    .aiq-step-circle {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }

    .aiq-grid {
        grid-template-columns: 1fr;
    }

    .aiq-controls,
    .aiq-edit-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .aiq-btn {
        width: 100%;
        justify-content: center;
    }

    .aiq-edit-preview img,
    .aiq-final-preview img {
        max-width: 100%;
    }
}
