/*
 * AI Onepager Generator - Frontend Stylesheet
 * Version: 24.13 (PayPal-Button als HTML/CSS)
 * Beschreibung: Stellt das Design für das Generator-Formular, den Ladebildschirm und das Lead-Formular bereit.
 */
:root {
    --aio-primary-color: #4f46e5; 
    --aio-primary-hover: #4338ca;
    --aio-primary-gradient: linear-gradient(to right, #6366f1, #8b5cf6);
    --aio-text-color: #374151; 
    --aio-label-color: #111827;
    --aio-border-color: #d1d5db;
    --aio-bg-color: #f9fafb;
    --aio-card-bg: #ffffff;
    --aio-radius: 12px;
    --aio-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.07), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --aio-error-bg: #fef2f2; --aio-error-text: #991b1b; --aio-error-border: #fecaca;
}

#aio-app-wrapper, .aio-lead-form { 
    max-width: 768px; 
    margin: 4rem auto; 
    position: relative; 
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.aio-lead-form { margin-top: 3rem; margin-bottom: 3rem; }

.aio-form-header { text-align: center; margin-bottom: 2.5rem; }
.aio-form-header h1 { font-size: 2.25rem; font-weight: 800; color: var(--aio-label-color); margin: 0 0 0.5rem 0; letter-spacing: -0.025em; }
.aio-lead-form .aio-form-header h3 { font-size: 1.875rem; font-weight: 700; color: var(--aio-label-color); margin: 0 0 0.5rem 0; }
.aio-form-header p { font-size: 1.125rem; color: #6b7280; margin: 0; }

.aio-message { padding: 1rem; margin-bottom: 1.5rem; border: 1px solid; border-radius: var(--aio-radius); word-wrap: break-word; }
.aio-error { color: var(--aio-error-text); background-color: var(--aio-error-bg); border-color: var(--aio-error-border); }

.aio-form-section { 
    margin-bottom: 2rem; 
    background-color: var(--aio-card-bg); 
    border: 1px solid var(--aio-border-color); 
    border-radius: var(--aio-radius); 
    box-shadow: var(--aio-shadow); 
    padding: 2.5rem; 
}

.aio-section-title { font-size: 1.25rem; font-weight: 600; color: var(--aio-label-color); margin-top: 0; margin-bottom: 1.5rem; border-bottom: 1px solid var(--aio-border-color); padding-bottom: 1rem;}

.aio-form-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 640px) { .aio-form-grid { grid-template-columns: 1fr 1fr; } }

.aio-form-group { margin-bottom: 1.5rem; }
#aio-generator-form > .aio-form-group:last-child { margin-bottom: 0; }
.aio-form-group label { display: block; font-weight: 500; margin-bottom: 0.5rem; color: var(--aio-label-color); font-size: 0.875rem; }
.aio-form-group label .aio-required-star {
    color: #ef4444;
    font-weight: 600;
    margin-left: 3px;
}
.aio-form-description { font-size: 0.875rem; color: #6b7280; margin-top: -0.25rem; margin-bottom: 0.75rem; }

#aio-form-container input[type='text'], 
#aio-form-container input[type='email'], 
#aio-form-container input[type='tel'], 
#aio-form-container textarea, 
#aio-form-container input[type='file'] { 
    width: 100%; 
    padding: .75rem 1rem; 
    border: 1px solid var(--aio-border-color); 
    border-radius: 8px; 
    background-color: #fff; 
    color: var(--aio-text-color); 
    box-sizing: border-box; 
    transition: border-color 0.2s, box-shadow 0.2s; 
    font-size: 1rem; 
}

#aio-form-container input[type='file'] { padding: .6rem 1rem; }
#aio-form-container input[type='file']::file-selector-button { font-weight: 500; font-size: 0.875rem; padding: .6rem .8rem; margin: -0.6rem -1rem; margin-right: 1rem; background-color: #f9fafb; border: none; border-right: 1px solid var(--aio-border-color); cursor: pointer; transition: background-color .2s; }
#aio-form-container input[type='file']::file-selector-button:hover { background-color: #f3f4f6; }
#aio-form-container input:focus, #aio-form-container textarea:focus { border-color: var(--aio-primary-color); outline: 0; box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2); }
#aio-form-container textarea { min-height: 150px; resize: vertical; }

.aio-submit-btn { 
    width: 100%; padding: 1rem; background-image: var(--aio-primary-gradient); color: #fff; border: none; border-radius: 8px; 
    font-size: 1rem; font-weight: 600; cursor: pointer; transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}
.aio-submit-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -2px rgb(0 0 0 / 0.05); }
.aio-submit-btn:disabled { opacity: 0.7; cursor: not-allowed; }

#aio-loader-overlay { position: fixed; inset: 0; background: rgba(255, 255, 255, 0.9); z-index: 9999; display: flex; align-items: center; justify-content: center; text-align: center; backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); opacity: 0; transition: opacity 0.3s ease; pointer-events: none; }
#aio-loader-overlay.visible { opacity: 1; pointer-events: auto; }
.aio-loader-content { max-width: 450px; padding: 20px; }
.aio-loader-content h2 { font-size: 1.8em; margin-bottom: 15px; color: var(--aio-label-color); }
.aio-loader-content p { font-size: 1.1em; color: var(--aio-text-color); }
.aio-spinner { width: 56px; height: 56px; border-radius: 50%; border: 6px solid #e5e7eb; border-top-color: var(--aio-primary-color); animation: aio-spin 1s linear infinite; margin: 0 auto 2rem auto;}
@keyframes aio-spin { to { transform: rotate(360deg); } }

.aio-progress-bar-container { width: 100%; background-color: #e5e7eb; border-radius: 10px; margin: 20px auto 10px auto; overflow: hidden; box-shadow: inset 0 1px 3px rgba(0,0,0,0.1); }
.aio-progress-bar { width: 0%; height: 12px; background-image: var(--aio-primary-gradient); border-radius: 10px; transition: width 0.5s ease-out; }
.aio-progress-percentage { font-size: 0.9em; font-weight: 500; color: var(--aio-text-color); margin-top: 0; }

.aio-lead-success { padding: 1.5rem; background: #d1e7dd; color: #0f5132; text-align: center; max-width: 768px; margin: 2rem auto; border-radius: var(--aio-radius); border: 1px solid #badbcc; }

.aio-template-selector { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
.aio-template-option input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.aio-template-option label { display: flex; align-items: center; justify-content: center; padding: 1rem; border: 2px solid var(--aio-border-color); border-radius: var(--aio-radius); font-weight: 600; color: var(--aio-text-color); cursor: pointer; transition: all 0.2s ease-in-out; position: relative; min-height: 38px; text-align: center; }
.aio-template-option label:hover { border-color: var(--aio-primary-hover); }
.aio-template-option input[type="radio"]:checked + label { border-color: var(--aio-primary-color); background-color: #f0f5ff; color: var(--aio-primary-color); box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2); }
.aio-template-option input[type="radio"]:focus-visible + label { box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2); }
.aio-template-option label::before { content: ''; display: inline-block; vertical-align: middle; width: 20px; height: 20px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.1); margin-right: 10px; }

.aio-payment-wall { text-align: center; }
.aio-payment-wall p { font-size: 1.125rem; color: var(--aio-text-color); margin-bottom: 2rem; }

.aio-paypal-form { 
    margin-top: 1.5rem; 
    text-align: center;
}

/* PayPal Button Styles - Neu */
.aio-paypal-form .aio-paypal-btn,
.aio-paypal-form .aio-paypal-btn-small {
    background-color: #FFC439; /* PayPal Gold */
    border: 1px solid #FFC439;
    border-radius: 25px; /* Pill shape */
    color: #003087; /* PayPal Blue */
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-family: "PayPal-Sans", Helvetica, Arial, sans-serif;
    font-weight: 800;
    text-align: center;
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out, background-color 0.2s;
    padding: 8px 24px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    height: 48px;
}

.aio-paypal-form .aio-paypal-btn-small {
    height: 40px;
    padding: 6px 18px;
    gap: 8px;
    margin-top: 1rem;
}

.aio-paypal-form .aio-paypal-btn:hover,
.aio-paypal-form .aio-paypal-btn-small:hover {
    background-color: #f5b92d;
    border-color: #f5b92d;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.aio-paypal-logo {
    display: inline-block;
    height: 22px;
}

.aio-paypal-btn-small .aio-paypal-logo {
    height: 18px;
}

.aio-paypal-text {
    font-size: 1rem;
    line-height: 1;
}

.aio-paypal-btn-small .aio-paypal-text {
    font-size: 0.9rem;
}

/* Hinweis-Box auf der Generator-Seite */
.aio-usage-notice {
    padding: 1.25rem;
    margin-bottom: 2rem;
    border: 1px solid;
    border-radius: var(--aio-radius);
    background-color: #eef2ff;
    color: #4338ca;
    border-color: #c7d2fe;
    text-align: left;
}
.aio-usage-notice strong {
    color: #3730a3;
}

/* Download-Sektion auf der generierten Seite */
.aio-download-section {
    max-width: 768px;
    margin: 3rem auto 1rem auto;
    padding: 2.5rem;
    background-color: var(--aio-card-bg);
    border: 1px solid var(--aio-border-color);
    border-radius: var(--aio-radius);
    box-shadow: var(--aio-shadow);
    text-align: center;
}
.aio-download-section h3 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--aio-label-color);
    margin: 0 0 0.5rem 0;
}
.aio-download-section p {
    font-size: 1.125rem;
    color: #6b7280;
    margin: 0 0 1.5rem 0;
}
.aio-download-section .aio-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: auto;
    padding: 1rem 2rem;
    background-image: linear-gradient(to right, #10b981, #34d399); /* Green Gradient */
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
    text-decoration: none;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}
.aio-download-section .aio-download-btn:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -2px rgb(0 0 0 / 0.05);
}
.aio-download-section .aio-download-btn svg {
    margin-top: -2px;
}

