/**
 * Alber SEO-Analyse – Frontend Styles
 * Design: Alber Marketing e.K.
 * Farben & Grundstil passend zu alber-wartungsvertrag-plugin
 */

:root {
    --aseo-primary:      #1a1a2e;
    --aseo-accent:       #e94560;
    --aseo-accent-hover: #d63d56;
    --aseo-success:      #10b981;
    --aseo-error:        #ef4444;
    --aseo-text:         #333;
    --aseo-text-light:   #666;
    --aseo-border:       #e5e7eb;
    --aseo-bg-light:     #f8f9fa;
    --aseo-shadow:       0 4px 6px -1px rgba(0,0,0,.10), 0 2px 4px -1px rgba(0,0,0,.06);
    --aseo-shadow-lg:    0 10px 15px -3px rgba(0,0,0,.10), 0 4px 6px -2px rgba(0,0,0,.05);
    --aseo-radius:       12px;
    --aseo-radius-sm:    8px;
    --aseo-transition:   .2s ease;
}

/* =========================================================
   Wrapper
   ========================================================= */

.alber-seo-form-wrap {
    font-family: inherit;
    color: var(--aseo-text);
    box-sizing: border-box;
}

.alber-seo-form-wrap *,
.alber-seo-form-wrap *::before,
.alber-seo-form-wrap *::after {
    box-sizing: border-box;
}

/* =========================================================
   Inputs (geteilt von Hero + CTA)
   ========================================================= */

.aseo-field input[type="url"],
.aseo-field input[type="email"],
.aseo-field input[type="text"],
.aseo-field input[type="tel"] {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid var(--aseo-border);
    border-radius: var(--aseo-radius-sm);
    font-size: 1rem;
    font-family: inherit;
    color: var(--aseo-text);
    background: #fff;
    transition: border-color var(--aseo-transition), box-shadow var(--aseo-transition);
    outline: none;
    line-height: 1.5;
    appearance: none;
    -webkit-appearance: none;
}

.aseo-field input:focus {
    border-color: var(--aseo-accent);
    box-shadow: 0 0 0 3px rgba(233, 69, 96, .12);
}

.aseo-field input.is-invalid {
    border-color: var(--aseo-error);
}

/* =========================================================
   Hero-Formular – Felder UNTEREINANDER
   ========================================================= */

.aseo-hero-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.aseo-hero-form .aseo-field {
    width: 100%;
}

.aseo-hero-form .aseo-field-btn {
    width: auto;
    display: flex;
    justify-content: center;
}

/* Info-/Datenschutztext über oder unter den Eingabefeldern */
.aseo-hero-form .aseo-fields-label {
    width: 100%;
    font-size: .75rem;
    font-weight: 400;
    color: var(--aseo-text-light);
    line-height: 1.5;
    text-align: center;
}

/* =========================================================
   CTA-Formular – Felder NEBENEINANDER (flex row)
   ========================================================= */

.aseo-cta-wrap {
    text-align: center;
}

.aseo-cta-headline {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--aseo-primary);
    margin: 0 0 10px;
    line-height: 1.25;
}

.aseo-cta-subline {
    font-size: 1rem;
    color: var(--aseo-text-light);
    margin: 0 0 28px;
}

.aseo-cta-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    align-items: stretch;
    max-width: 820px;
    margin: 0 auto;
}

.aseo-cta-fields .aseo-field {
    flex: 1 1 220px;
    min-width: 0;
}

.aseo-cta-fields .aseo-field-btn {
    flex: 0 0 auto;
}

.aseo-cta-fields .aseo-submit-btn {
    height: 100%;
    white-space: nowrap;
}

/* =========================================================
   Submit-Button (passend zu alber-accent #e94560)
   ========================================================= */

.aseo-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 28px;
    background: #E94560;
    color: #fff;
    border: none;
    outline: none;
    box-shadow: none;
    border-radius: var(--aseo-radius-sm);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background var(--aseo-transition), transform var(--aseo-transition), box-shadow var(--aseo-transition);
    line-height: 1;
    text-decoration: none;
    -webkit-appearance: none;
    appearance: none;
}

.aseo-submit-btn:hover:not(:disabled) {
    background: var(--aseo-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233, 69, 96, .35);
}

.aseo-submit-btn:disabled {
    opacity: .7;
    cursor: not-allowed;
    transform: none;
}

/* =========================================================
   Trust-Zeile
   ========================================================= */

.alber-seo-trust {
    margin-top: 10px;
    font-size: .82rem;
    color: var(--aseo-text-light);
    text-align: center;
}

/* =========================================================
   Fehlermeldung
   ========================================================= */

.alber-seo-error {
    margin-top: 10px;
    padding: 10px 14px;
    background: #fef2f2;
    color: var(--aseo-error);
    border: 1px solid #fecaca;
    border-radius: var(--aseo-radius-sm);
    font-size: .9rem;
}

/* =========================================================
   Spinner
   ========================================================= */

.alber-seo-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: alberSeoSpin .7s linear infinite;
    vertical-align: middle;
}

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

/* =========================================================
   POPUP / MODAL (passend zu alber-modal aus wartungsvertrag)
   ========================================================= */

.alber-seo-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.alber-seo-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,.6);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.alber-seo-modal-box {
    position: relative;
    background: #fff;
    border-radius: var(--aseo-radius);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,.25);
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    animation: alberSeoModalIn .3s ease;
}

@keyframes alberSeoModalIn {
    from { opacity: 0; transform: translateY(-20px) scale(.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.alber-seo-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(0,0,0,.06);
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    color: var(--aseo-text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--aseo-transition), color var(--aseo-transition);
    z-index: 2;
}

.alber-seo-modal-close:hover {
    background: rgba(0,0,0,.12);
    color: var(--aseo-text);
}

/* =========================================================
   Popup-Inhalt
   ========================================================= */

.alber-seo-popup-inner {
    padding: 2.5rem 2rem 2rem;
}

.alber-seo-popup-header {
    margin-bottom: 1.5rem;
}

.alber-seo-popup-step-badge {
    display: inline-block;
    background: #d1fae5;
    color: #065f46;
    font-size: .78rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 10px;
    letter-spacing: .02em;
}

.alber-seo-popup-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--aseo-primary);
    line-height: 1.3;
}

.alber-seo-popup-header p {
    margin: 0;
    color: var(--aseo-text-light);
    font-size: .93rem;
}

/* Popup-Formularfelder */

.alber-seo-form-group {
    margin-bottom: 14px;
}

.alber-seo-form-group label {
    display: block;
    font-size: .86rem;
    font-weight: 600;
    color: var(--aseo-text);
    margin-bottom: 5px;
}

.alber-seo-form-group input,
.alber-seo-form-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--aseo-border);
    border-radius: var(--aseo-radius-sm);
    font-size: .95rem;
    font-family: inherit;
    color: var(--aseo-text);
    background: #fff;
    transition: border-color var(--aseo-transition), box-shadow var(--aseo-transition);
    outline: none;
    line-height: 1.5;
    appearance: none;
    -webkit-appearance: none;
}

.alber-seo-form-group input:focus,
.alber-seo-form-group textarea:focus {
    border-color: var(--aseo-accent);
    box-shadow: 0 0 0 3px rgba(233, 69, 96, .12);
}

.alber-seo-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.alber-seo-form-row {
    display: flex;
    gap: 14px;
}

.alber-seo-form-row .alber-seo-form-group {
    flex: 1;
}

/* Datenschutz-Checkbox */

.alber-seo-checkbox-group label {
    font-weight: 400 !important;
}

.alber-seo-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: .86rem;
    color: var(--aseo-text-light);
    cursor: pointer;
    line-height: 1.4;
}

.alber-seo-checkbox-label input[type="checkbox"] {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    margin-top: 1px;
    accent-color: var(--aseo-accent);
    cursor: pointer;
}

.alber-seo-checkbox-label a {
    color: var(--aseo-accent);
    text-decoration: underline;
}

/* Popup-Submit */

.alber-seo-popup-actions {
    margin-top: 18px;
}

.alber-seo-popup-actions .aseo-submit-btn {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
}

/* =========================================================
   Popup Erfolgsmeldung
   ========================================================= */

.alber-seo-popup-success {
    padding: 3rem 2rem;
    text-align: center;
}

.alber-seo-success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--aseo-success);
    color: #fff;
    font-size: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.2rem;
    font-weight: 700;
}

.alber-seo-popup-success h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 10px;
    color: var(--aseo-primary);
}

.alber-seo-popup-success p {
    color: var(--aseo-text-light);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.alber-seo-popup-success strong {
    color: var(--aseo-text);
}

/* Close-Button im Erfolgs-Screen */

.alber-seo-close-popup {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 28px;
    background: var(--aseo-bg-light);
    color: var(--aseo-text);
    border: 1.5px solid var(--aseo-border);
    border-radius: var(--aseo-radius-sm);
    font-size: .95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background var(--aseo-transition), box-shadow var(--aseo-transition);
}

.alber-seo-close-popup:hover {
    background: #fff;
    box-shadow: var(--aseo-shadow);
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 640px) {
    .aseo-cta-fields {
        flex-direction: column;
        align-items: stretch;
    }

    .aseo-cta-fields .aseo-field,
    .aseo-cta-fields .aseo-field-btn {
        flex: 1 1 100%;
    }

    .aseo-cta-fields .aseo-submit-btn {
        width: 100%;
    }

    .alber-seo-form-row {
        flex-direction: column;
        gap: 0;
    }

    .alber-seo-popup-inner {
        padding: 2rem 1.25rem 1.5rem;
    }
}
