/**
 * DRV Checkout Widget V3 Styles
 * Mit aufklappbaren Sektionen fuer Lernziele und Inhalte
 */

/* =========================================================================
   BASE & LOADING
   ========================================================================= */

#drv-checkout-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.drv-loading {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.drv-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #ea580c;
    border-radius: 50%;
    animation: drv-spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes drv-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.drv-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 20px;
    color: #dc2626;
    text-align: center;
}

/* =========================================================================
   HERO SECTION
   ========================================================================= */

.drv-hero {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.drv-hero-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.drv-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.95rem;
    opacity: 0.95;
}

.drv-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.drv-meta-item svg {
    flex-shrink: 0;
}

.drv-price-highlight {
    font-weight: 600;
    font-size: 1.1rem;
}

.drv-price-highlight small {
    font-weight: 400;
    font-size: 0.8rem;
    opacity: 0.9;
}

/* =========================================================================
   BADGES
   ========================================================================= */

.drv-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
}

.drv-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.drv-badge-hersteller {
    color: white;
}

.drv-badge-drv {
    background: #ecfdf5;
    color: #059669;
}

.drv-badge-punkte {
    background: #eff6ff;
    color: #2563eb;
}

.drv-badge-dauer {
    background: #f3f4f6;
    color: #4b5563;
}

/* =========================================================================
   SECTIONS
   ========================================================================= */

.drv-section {
    margin-bottom: 25px;
}

.drv-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 12px 0;
}

.drv-description {
    color: #4b5563;
    line-height: 1.7;
}

/* =========================================================================
   COLLAPSIBLE SECTIONS (Lernziele, Inhalte)
   ========================================================================= */

.drv-collapsible {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.drv-collapse-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f9fafb;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s;
}

.drv-collapse-header:hover {
    background: #f3f4f6;
}

.drv-collapse-header .drv-section-title {
    margin: 0;
}

.drv-collapse-icon {
    font-size: 0.8rem;
    color: #6b7280;
    transition: transform 0.3s;
}

.drv-collapsible.drv-expanded .drv-collapse-icon {
    transform: rotate(180deg);
}

.drv-collapse-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.drv-collapsible.drv-expanded .drv-collapse-content {
    max-height: 1000px;
    transition: max-height 0.5s ease-in;
}

.drv-collapse-content ul {
    margin: 0;
    padding: 20px;
    padding-left: 40px;
}

.drv-collapse-content li {
    margin-bottom: 8px;
    color: #4b5563;
    line-height: 1.5;
}

.drv-list-check li {
    list-style: none;
    position: relative;
    padding-left: 0;
    margin-left: -20px;
}

.drv-list-check li::before {
    content: none;
}

/* =========================================================================
   LOCATION CARD
   ========================================================================= */

.drv-location-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px 20px;
    color: #374151;
    line-height: 1.6;
}

/* =========================================================================
   AVAILABILITY
   ========================================================================= */

.drv-availability {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #ecfdf5;
    border-radius: 8px;
    color: #059669;
    font-weight: 500;
    margin-bottom: 25px;
}

.drv-availability-low {
    background: #fef3c7;
    color: #d97706;
}

.drv-availability-icon {
    font-size: 1.1rem;
}

/* =========================================================================
   ACTION BUTTONS
   ========================================================================= */

.drv-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.drv-btn {
    flex: 1;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.drv-btn-primary {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
}

.drv-btn-primary:hover {
    background: linear-gradient(135deg, #ea580c 0%, #dc2626 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
}

.drv-btn-secondary {
    background: white;
    color: #374151;
    border: 2px solid #d1d5db;
}

.drv-btn-secondary:hover {
    border-color: #9ca3af;
    background: #f9fafb;
}

.drv-btn-disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
}

.drv-btn-full {
    width: 100%;
}

.drv-hint {
    text-align: center;
    color: #6b7280;
    font-size: 0.85rem;
    margin: 0;
}

/* =========================================================================
   BACK BUTTON
   ========================================================================= */

.drv-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
    background: none;
    border: none;
    color: #ea580c;
    font-size: 0.95rem;
    cursor: pointer;
    margin-bottom: 20px;
}

.drv-back-btn:hover {
    color: #dc2626;
}

/* =========================================================================
   MINI SUMMARY
   ========================================================================= */

.drv-mini-summary {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 25px;
}

.drv-mini-summary strong {
    display: block;
    color: #1f2937;
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.drv-mini-summary span {
    color: #6b7280;
    font-size: 0.9rem;
}

/* =========================================================================
   STEP TITLES
   ========================================================================= */

.drv-step-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px 0;
}

.drv-step-subtitle {
    color: #6b7280;
    margin: 0 0 25px 0;
}

/* =========================================================================
   CHOICE CARDS (Privat/Firma)
   ========================================================================= */

.drv-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.drv-choice-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 25px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.drv-choice-card:hover {
    border-color: #ea580c;
    background: #fff7ed;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.drv-choice-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.drv-choice-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 6px;
}

.drv-choice-desc {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.drv-choice-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ea580c;
}

.drv-choice-price small {
    font-weight: 400;
    font-size: 0.8rem;
    color: #6b7280;
}

/* =========================================================================
   ANZAHL SELECTOR
   ========================================================================= */

.drv-anzahl-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}

.drv-anzahl-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #e5e7eb;
    background: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drv-anzahl-btn:hover:not(:disabled) {
    border-color: #ea580c;
    color: #ea580c;
}

.drv-anzahl-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.drv-anzahl-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    min-width: 60px;
    text-align: center;
}

.drv-anzahl-info {
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 25px;
}

/* =========================================================================
   PRICE SUMMARY
   ========================================================================= */

.drv-price-summary {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.drv-price-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    color: #4b5563;
}

.drv-price-total {
    border-top: 1px solid #e5e7eb;
    margin-top: 8px;
    padding-top: 12px;
    font-weight: 600;
    color: #1f2937;
}

.drv-price-brutto {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ea580c;
}

/* =========================================================================
   INFO BOX
   ========================================================================= */

.drv-info-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 15px 20px;
    color: #1e40af;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

.drv-info-box strong {
    display: block;
    margin-bottom: 4px;
}

/* =========================================================================
   RESPONSIVE
   ========================================================================= */

@media (max-width: 600px) {
    #drv-checkout-container {
        padding: 15px;
    }
    
    .drv-hero {
        padding: 20px;
    }
    
    .drv-hero-title {
        font-size: 1.4rem;
    }
    
    .drv-hero-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .drv-actions {
        flex-direction: column;
    }
    
    .drv-choice-grid {
        grid-template-columns: 1fr;
    }
    
    .drv-step-title {
        font-size: 1.25rem;
    }
}

/* =========================================================================
   LOGIN PAGE
   ========================================================================= */

.drv-checkout-login {
    max-width: 500px;
    margin: 0 auto;
}

.drv-login-container {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 30px;
    margin-top: 20px;
}

.drv-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
    box-sizing: border-box;
}

.drv-input:focus {
    outline: none;
    border-color: #ea580c;
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.1);
}

.drv-btn-full {
    width: 100%;
}

.drv-auth-links {
    margin-top: 20px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.drv-auth-links p {
    margin: 8px 0;
    font-size: 0.9rem;
    color: #6b7280;
}

.drv-auth-links a {
    color: #ea580c;
    text-decoration: none;
    font-weight: 500;
}

.drv-auth-links a:hover {
    text-decoration: underline;
}

@media (max-width: 640px) {
    .drv-login-container {
        padding: 20px;
    }
}

/* =========================================================================
   CONFIRM PAGE (Bestätigung vor Buchungserstellung)
   ========================================================================= */

.drv-checkout-confirm {
    max-width: 700px;
    margin: 0 auto;
}

.drv-confirm-section {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
}

.drv-confirm-section-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #f3f4f6;
}

.drv-confirm-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.drv-confirm-item:last-child {
    border-bottom: none;
}

.drv-confirm-label {
    font-size: 0.95rem;
    color: #6b7280;
    font-weight: 500;
    flex: 0 0 140px;
}

.drv-confirm-value {
    font-size: 0.95rem;
    color: #1f2937;
    font-weight: 500;
    text-align: right;
    flex: 1;
}

.drv-confirm-price-summary {
    margin-top: 15px;
}

.drv-confirm-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 0.95rem;
}

.drv-confirm-price-row:not(.drv-confirm-price-total) {
    color: #6b7280;
}

.drv-confirm-price-total {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1f2937;
    margin-top: 10px;
    padding-top: 15px;
    border-top: 2px solid #e5e7eb;
}

@media (max-width: 640px) {
    .drv-confirm-section {
        padding: 20px;
    }
    
    .drv-confirm-item {
        flex-direction: column;
        gap: 5px;
    }
    
    .drv-confirm-label {
        flex: 1;
    }
    
    .drv-confirm-value {
        text-align: left;
    }
}
