/* --- ADHELDEN CHECKOUT OS | PURE MINIMALISM --- */
:root {
    --ac-bg: transparent;
    /* Kein Karten-Hintergrund mehr */
    --ac-field-bg: #FFFFFF;
    --ac-border: #D1D1D6;
    /* Etwas stärkerer Kontrast für Standalone-Felder */
    --ac-focus: #007AFF;
    /* Apple System Blue für Focus (oder dein #000) */
    --ac-brand: #FCDB00;
    --ac-text: #1D1D1F;
    --ac-radius: 10px;
    /* Etwas straffer */
    --ac-ease: cubic-bezier(0.25, 1, 0.5, 1);
}

.ah-co-checkout-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 0;
    /* Vertikaler Abstand zur Seite */
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
}

.ah-co-checkout-app {
    width: 100%;
    /* Optimale Lesebreite */
    background: transparent;
    box-shadow: none;
    border: none;
    padding: 0;
    /* WICHTIG: Kein Innenabstand */
    position: relative;
    overflow: visible;
    /* Schatten der Inputs dürfen nicht abgeschnitten werden */
    transition: height 0.4s var(--ac-ease);
    min-height: 500px;
    box-sizing: border-box;
}

.ah-co-checkout-app * {
    box-sizing: border-box;
}

/* STEPS & ANIMATION */
.ah-co-step {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.ah-co-step.active-step {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
    position: relative;
    z-index: 2;
}

.ah-co-step.prev-step {
    transform: translateX(-20px);
    opacity: 0;
    position: absolute;
}

.ah-co-step.next-step {
    transform: translateX(20px);
    opacity: 0;
    position: absolute;
}

/* HEADER (Minimal) */
.ah-co-checkout-header {
    margin-bottom: 30px;
}

.ah-co-progress-track {
    height: 2px;
    background: #E5E5E5;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 15px;
}

.ah-co-progress-bar {
    height: 100%;
    width: 50%;
    background: #FCDB00;
    transition: width 0.4s ease;
}

/* Schwarz wirkt technischer */

.ah-co-steps-label {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    font-weight: 600;
    color: #8E8E93;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ah-co-steps-label span.active {
    color: #000;
}

.ah-co-step-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 25px 0;
    color: var(--ac-text);
    letter-spacing: -0.5px;
    line-height: 1.1;
}

/* INPUTS (The Star of the Show) */
.ah-co-grid-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.ah-co-input-group {
    margin-bottom: 20px;
    text-align: left;
}

.ah-co-input-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--ac-text);
}

.ah-co-input-group input,
.ah-co-input-group select {
    width: 100%;
    height: 52px;
    /* Apple Standard Height */
    padding: 0 16px;
    background: var(--ac-field-bg);
    border: 1px solid var(--ac-border);
    border-radius: var(--ac-radius);
    font-size: 17px;
    /* Prevent iOS Zoom */
    color: var(--ac-text);
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    -webkit-appearance: none;
    outline: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
    /* Ultra-subtle depth */
}

.ah-co-input-group input:focus,
.ah-co-input-group select:focus {
    border-color: #000;
    /* Apple Black Focus */
    box-shadow: 0 0 0 1px #000;
    transform: translateY(-1px);
}

.ah-co-input-group input.error {
    border-color: #FF3B30;
    background: #FFF5F5;
    animation: shake 0.3s;
}

/* ICONS & EXTRAS */
.ah-co-input-icon {
    position: relative;
}

.ah-co-input-icon svg {
    position: absolute;
    left: 16px;
    top: 17px;
    pointer-events: none;
    color: #8E8E93;
}

.ah-co-input-icon input {
    padding-left: 48px;
}

.ah-co-select-wrapper {
    position: relative;
}

.ah-co-select-wrapper::after {
    content: '';
    position: absolute;
    right: 20px;
    top: 22px;
    width: 6px;
    height: 6px;
    border-right: 2px solid #8E8E93;
    border-bottom: 2px solid #8E8E93;
    transform: rotate(45deg);
    pointer-events: none;
}

/* BUTTONS */
.ah-co-btn-primary {
    width: 100%;
    height: 56px;
    background: #000000;
    color: #FFFFFF;
    font-size: 17px;
    font-weight: 600;
    border: none;
    border-radius: 14px;
    /* Matches inputs visually */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s, background 0.2s;
    margin-top: 20px;
}

.ah-co-btn-primary:hover {
    background: #333;
    transform: scale(1.01);
}

.ah-co-btn-primary:active {
    transform: scale(0.98);
}

.ah-co-btn-ghost {
    background: transparent;
    color: #8E8E93;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 15px;
    width: 100%;
}

.ah-co-btn-ghost:hover {
    color: #000;
    background: none;
}

.back-link:hover {
    background: none;
}

/* SUMMARY & TABS */
.ah-co-summary-card {
    background: #FFFFFF;
    /* White card on background */
    border: 1px solid var(--ac-border);
    border-radius: var(--ac-radius);
    padding: 20px;
    margin-bottom: 25px;
}

.ah-co-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.ah-co-summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 17px;
    font-weight: 700;
    padding-top: 12px;
    border-top: 1px solid #EEE;
}

.ah-co-payment-tabs {
    display: flex;
    background: #EFEFF4;
    padding: 3px;
    border-radius: 10px;
    margin-bottom: 25px;
}

.ah-co-tab {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #8E8E93;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: 0.2s;
}

.ah-co-tab.active {
    background: #FFFFFF;
    color: #000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.ah-co-secure-note {
    margin-top: 20px;
    font-size: 11px;
    color: #AEAEB2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

/* AUTOCOMPLETE */
.pac-container {
    border: 1px solid var(--ac-border);
    border-top: none;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    border-radius: 0 0 12px 12px;
    margin-top: -2px;
}

.pac-item {
    padding: 12px 16px;
    border-top: 1px solid #F2F2F7;
    font-size: 14px;
}

.pac-icon {
    display: none;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-4px);
    }

    75% {
        transform: translateX(4px);
    }
}

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

/* MOBILE */
@media(max-width: 500px) {
    .ah-co-checkout-wrapper {
        padding: 0;
    }

    .ah-co-checkout-app {
        padding: 20px;
        min-height: 100vh;
    }

    .ah-co-step-title {
        font-size: 24px;
    }

    .ah-co-grid-row {
        gap: 10px;
    }
}