/* ==========================================================================
   OverlayBox Styles - Verbesserte Version
   ========================================================================== */

.bgCover {
    position: fixed;
    left: 0;
    top: 0;
    display: none;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    z-index: 9998; /* Unter Gallery-Overlay aber über normalem Content */
    transition: opacity 0.3s ease;
}

.overlayBox {
    background-color: #fff;
    width: 90%;
    max-width: 600px;
    padding: 24px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    display: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    
    /* Dynamische Höhe */
    max-height: 90vh;
    overflow-y: auto;
    
    /* Smooth Animation */
    opacity: 0;
    scale: 0.9;
    transition: opacity 0.3s ease, scale 0.3s ease;
}

.overlayBox[style*="display: flex"],
.overlayBox[style*="display: block"] {
    opacity: 1;
    scale: 1;
}

/* Scrollbar Styling */
.overlayBox::-webkit-scrollbar {
    width: 8px;
}

.overlayBox::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.overlayBox::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.overlayBox::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Firefox Scrollbar */
.overlayBox {
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

/* ==========================================================================
   Seller Info Components
   ========================================================================== */

.seller-info {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.seller-avatar {
    flex-shrink: 0;
}

.seller-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e9ecef;
    transition: border-color 0.3s ease;
}

.seller-avatar img:hover {
    border-color: #007bff;
}

.seller-details {
    flex-grow: 1;
    min-width: 0; /* Für text-overflow */
}

.seller-name {
    font-size: 1.2em;
    margin: 0 0 4px 0;
    font-weight: 600;
    color: #212529;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.seller-description {
    font-size: 0.9em;
    color: #6c757d;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================================
   Progress Components
   ========================================================================== */

.progress-container {
    margin: 20px 0;
    padding: 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.progress-container p {
    margin: 0 0 10px 0;
    font-size: 0.9em;
    color: #495057;
    font-weight: 500;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    width: 20%; /* Startwert */
    height: 100%;
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
    border-radius: 4px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ==========================================================================
   Form Elements
   ========================================================================== */

.overlayBox form {
    margin: 0;
}

.overlayBox label {
    display: block;
    margin-bottom: 6px;
    margin-top: 16px;
    font-weight: 600;
    color: #495057;
    font-size: 0.9em;
}

.overlayBox label:first-of-type {
    margin-top: 0;
}

.overlayBox input[type="text"],
.overlayBox input[type="email"],
.overlayBox input[type="tel"],
.overlayBox input[type="password"],
.overlayBox textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    margin-bottom: 4px;
    font-family: inherit;
    background: #fff;
}

.overlayBox input:focus,
.overlayBox textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    background: #fafbfc;
}

.overlayBox input:disabled,
.overlayBox textarea:disabled {
    background: #f8f9fa;
    border-color: #dee2e6;
    color: #6c757d;
    cursor: not-allowed;
}

.overlayBox textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
}

/* Error States */
.overlayBox input.error,
.overlayBox textarea.error {
    border-color: #dc3545;
    background: #fff5f5;
}

.error-message {
    color: #dc3545 !important;
    font-size: 12px !important;
    margin-top: 4px !important;
    margin-bottom: 8px !important;
    display: flex;
    align-items: center;
    gap: 4px;
}

.error-message::before {
    content: "⚠";
    font-size: 14px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.overlayBox button,
.overlayBox .lp-button {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 120px;
}

.overlayBox button[type="submit"],
.overlayBox .lp-button.lp-orange2 {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
}

.overlayBox button[type="submit"]:hover,
.overlayBox .lp-button.lp-orange2:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.overlayBox .closeLink,
.overlayBox .lp-button.lp-red {
    background: linear-gradient(135deg, #6c757d 0%, #545b62 100%);
    color: white;
}

.overlayBox .closeLink:hover,
.overlayBox .lp-button.lp-red:hover {
    background: linear-gradient(135deg, #545b62 0%, #383d41 100%);
    transform: translateY(-1px);
}

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

@media screen and (max-width: 768px) {
    .overlayBox {
        width: 95%;
        margin: 20px auto;
        padding: 20px;
        max-height: 95vh;
    }
    
    .seller-info {
        flex-direction: column;
        align-items: flex-start;
        text-align: center;
        gap: 12px;
    }
    
    .seller-avatar {
        align-self: center;
    }
    
    .seller-name,
    .seller-description {
        text-align: center;
        white-space: normal;
    }
    
    .progress-container {
        margin: 16px 0;
        padding: 12px;
    }
    
    .overlayBox button,
    .overlayBox .lp-button {
        width: 100%;
        margin-bottom: 8px;
    }
}

@media screen and (max-width: 480px) {
    .overlayBox {
        width: 98%;
        padding: 16px;
        border-radius: 8px;
    }
    
    .seller-avatar img {
        width: 50px;
        height: 50px;
    }
    
    .seller-name {
        font-size: 1.1em;
    }
    
    .seller-description {
        font-size: 0.85em;
    }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.overlayBox:focus-within {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .overlayBox,
    .progress-fill,
    .overlayBox input,
    .overlayBox textarea,
    .overlayBox button {
        transition: none !important;
        animation: none !important;
    }
    
    .progress-fill::after {
        display: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .overlayBox {
        border: 2px solid;
    }
    
    .progress-bar {
        border: 1px solid;
    }
    
    .seller-info {
        border: 2px solid;
    }
}

/* ==========================================================================
   Dark Mode Support
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    .overlayBox {
        background-color: #2d3748;
        color: #e2e8f0;
    }
    
    .seller-info {
        background: #4a5568;
        border-color: #718096;
    }
    
    .seller-name {
        color: #f7fafc;
    }
    
    .seller-description {
        color: #cbd5e0;
    }
    
    .progress-container {
        background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
        border-color: #718096;
    }
    
    .progress-bar {
        background: #718096;
    }
    
    .overlayBox input,
    .overlayBox textarea {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .overlayBox input:focus,
    .overlayBox textarea:focus {
        border-color: #63b3ed;
        background: #2d3748;
    }
}