/* PV365 Elegant Lightbox Funnel */
:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* Trigger Button */
.pv365-trigger-btn {
    background: linear-gradient(135deg, #FF6B35 0%, #FF8C5A 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.pv365-trigger-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

/* Modal Overlay */
.pv365-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    /* Höhe korrekt für iOS und moderne Browser */
    height: 100vh;   /* Fallback */
    height: 100svh;  /* iOS 15+ */
    height: 100dvh;  /* modern */
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999999;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.pv365-modal-overlay.active {
    opacity: 1;
}

/* Modal Container */
.pv365-modal {
    position: relative;
    background: #F5F5F5;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    /* Dynamische Höhe statt zu tiefem Viewport */
    min-height: 100vh;   /* Fallback */
    min-height: 100svh;  /* iOS 15+ */
    min-height: 100dvh;  /* modern */
    /* Platz nach unten für Footer plus Safe-Area */
    padding: 50px 20px calc(70px + var(--safe-bottom));
    /* Kein zusätzlicher Downshift */
    transform: none;
    transition: transform 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.pv365-modal-overlay.active .pv365-modal {
    transform: none;
}

/* Close Button */
.pv365-close-btn {
    position: fixed;
    top: calc(6px + var(--safe-top));
    right: 10px;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    background: white;
    border: 2px solid #E5E7EB;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #666;
}

.pv365-close-btn:hover {
    transform: scale(1.05);
    background: #f5f5f5;
    border-color: #FF6B35;
    color: #FF6B35;
}

/* Progress Steps */
.pv365-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    padding: calc(10px + var(--safe-top)) 56px 10px 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    z-index: 9;
}

.pv365-progress-steps {
    display: flex;
    justify-content: center;
    gap: 6px;
    max-width: 500px;
    margin: 0 auto;
}

.pv365-progress-step {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #E0E0E0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: #999;
    transition: all 0.3s;
}

.pv365-progress-step.active {
    background: #232323;
    color: white;
    transform: scale(1.1);
}

.pv365-progress-step.completed {
    background: #4CAF50;
    color: white;
}

/* Steps */
.pv365-step {
    display: none;
    animation: fadeSlideIn 0.3s ease;
    padding: 0 16px;
    margin-bottom: 20px;
}

.pv365-step-active {
    display: block;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateX(15px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Step Header */
.pv365-step-header {
    text-align: center;
    margin-bottom: 24px;
}

.pv365-step-header h2 {
    font-size: 19px;
    color: #1A2332;
    margin: 0 0 8px 0;
    font-weight: 700;
    line-height: 1.3;
}

.pv365-step-header p {
    font-size: 13px;
    color: #6B7280;
    margin: 0;
    line-height: 1.4;
}

/* Grid Layout */
.pv365-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.pv365-grid-3 {
    grid-template-columns: repeat(1, 1fr);
}

/* Cards */
.pv365-card {
    position: relative;
    cursor: pointer;
    display: block;
}

.pv365-card input[type="radio"],
.pv365-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pv365-card-content {
    background: white;
    border: 2px solid #E5E7EB;
    border-radius: 10px;
    padding: 18px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 0.25s ease;
    min-height: 110px;
    justify-content: center;
}

.pv365-card:hover .pv365-card-content {
    border-color: #FF6B35;
    box-shadow: 0 2px 10px rgba(255, 107, 53, 0.12);
    transform: translateY(-1px);
}

.pv365-card input:checked + .pv365-card-content {
    border-color: #FF6B35;
    border-width: 2px;
    background: #FFF5F2;
    box-shadow: 0 2px 12px rgba(255, 107, 53, 0.18);
}

.pv365-icon {
    width: 40px;
    height: 40px;
}

.pv365-card-content span {
    font-size: 13px;
    font-weight: 600;
    color: #1A2332;
    text-align: center;
    line-height: 1.2;
}

/* Form Fields */
.pv365-form-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pv365-input-group {
    position: relative;
}

.pv365-input-icon {
    display: none;
}

.pv365-input-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #E5E7EB;
    border-radius: 10px !important;
    font-size: 14px;
    background: white;
    transition: all 0.3s;
    font-family: inherit;
    box-sizing: border-box;
}

.pv365-input-group input:focus {
    outline: none;
    border-color: #FF6B35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.08);
}

.pv365-checkbox-wrapper {
    margin-top: 6px;
}

.pv365-checkbox-wrapper label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: #6B7280;
    cursor: pointer;
}

.pv365-checkbox-wrapper input[type="checkbox"] {
    margin-top: 2px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Submit Button */
.pv365-submit-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #FF6B35 0%, #FF8C5A 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 16px;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.pv365-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

.pv365-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Footer Step 1 - Logo + Badges */
.pv365-footer-step1 {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #232323;
    /* Safe-Area berücksichtigen */
    padding: 0 0 var(--safe-bottom);
    z-index: 9;
    height: calc(56px + var(--safe-bottom));
    display: flex;
    align-items: center;
    justify-content: center;
}

.pv365-footer-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    max-width: 500px;
    width: 100%;
    padding: 6px 8px calc(6px + var(--safe-bottom));
    gap: 6px 10px;
    text-align: center;
}


.pv365-footer-logo {
    height: 32px;
    width: auto;
}

.pv365-footer-badges {
    display: flex;
    gap: 6px;
    align-items: center;
}

.pv365-footer-badge {
    height: 28px;
    width: auto;
}

/* Navigation Steps 2-7 */
.pv365-navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #232323;
    /* Safe-Area berücksichtigen */
    padding: 16px 0 calc(16px + var(--safe-bottom));
    z-index: 9;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 -1px 0 #232323;
    height: calc(56px + var(--safe-bottom));
}

.pv365-back-btn,
.pv365-next-btn {
    background: #232323;
    color: #FF6B35;
    border: 2px solid #FF6B35;
    padding: 0 24px;
    height: 40px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    outline: 1px solid #232323;
    outline-offset: -1px;
}

.pv365-back-btn:hover,
.pv365-next-btn:hover {
    background: #FF6B35;
    color: white;
    outline: none;
}

/* Success Message */
.pv365-success-content {
    text-align: center;
    padding: 32px 16px;
    animation: successPop 0.5s ease;
}

@keyframes successPop {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.pv365-success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
}

.pv365-success-content h2 {
    font-size: 20px;
    color: #1A2332;
    margin: 0 0 10px 0;
}

.pv365-success-content p {
    font-size: 14px;
    color: #6B7280;
    margin: 0;
    line-height: 1.5;
}

/* Loading State */
.pv365-loading::after {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 6px;
}

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

/* Tablet & Desktop */
@media (min-width: 640px) {
    .pv365-modal {
        min-height: auto;
        /* saubere Maxhöhe auch auf iOS */
        max-height: 85vh;   /* Fallback */
        max-height: 85svh;
        max-height: 85dvh;
        margin: 7.5vh auto;
        border-radius: 12px;
        padding: 60px 28px calc(80px + var(--safe-bottom));
        overflow-y: auto;
    }

    .pv365-progress-container {
        position: absolute;
        border-radius: 12px 12px 0 0;
        padding-top: 10px; /* Desktop hat keine Notch, kleiner halten */
    }

    .pv365-footer-step1,
    .pv365-navigation {
        position: absolute;
        border-radius: 0 0 12px 12px;
        padding-bottom: var(--safe-bottom);
        height: calc(56px + var(--safe-bottom));
    }

    .pv365-step-header h2 {
        font-size: 21px;
    }

    .pv365-grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
	@media (max-width: 480px) {
  .pv365-footer-logo {
    display: none;
  }
}

}
@media (max-width: 480px) {
  .pv365-navigation {
    min-height: calc(56px + var(--safe-bottom));
    padding: 28px 12px calc(16px + var(--safe-bottom));
  }
}
