/* Unified Details Popup - Compact Design */

/* Main Popup Container */
.details-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #000000;
    border: 2px solid #c8a165;
    border-radius: 12px;
    width: 90vw;
    max-width: 420px;
    max-height: 80vh;
    overflow: hidden;
    z-index: 15000;
    display: none;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

/* Header als Grid */
.details-header {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #000000 0%, #111111 100%);
    border-bottom: 1px solid #333;
    position: relative;
}

.details-title {
    color: #c8a165;
    font-size: 1.4em;
    font-weight: bold;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.details-close-btn {
    background: none;
    border: none;
    color: #c8a165;
    font-size: 1.2em;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    justify-self: end;
    align-self: start;
    position: static;
    margin-left: 12px;
    z-index: 10;
}

.details-close-btn:hover {
    background: rgba(200, 161, 101, 0.1);
    transform: scale(1.1);
}

/* Backdrop für Details-Popup */
.details-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(6px);
    z-index: 14000;
    display: block;
}

/* Loading State */
.details-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #ffffff;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #333;
    border-top: 2px solid #c8a165;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 12px;
}

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

.details-loading span {
    font-size: 0.9em;
    color: #999;
}

/* Content */
.details-content {
    padding: 20px;
    color: #ffffff;
}

/* Info Grid - Compact Layout */
.details-info-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #222;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: #999;
    font-size: 0.85em;
    font-weight: 500;
    min-width: 80px;
}

.info-value {
    color: #ffffff;
    font-size: 0.9em;
    font-weight: 500;
    text-align: right;
    flex: 1;
    margin-left: 12px;
}

/* Description */
.details-description {
    margin-bottom: 20px;
}

.details-description .info-label {
    display: block;
    margin-bottom: 8px;
    color: #999;
    font-size: 0.85em;
    font-weight: 500;
}

.description-text {
    color: #ffffff;
    font-size: 0.9em;
    line-height: 1.5;
    background: #111;
    padding: 12px;
    border-radius: 6px;
    border-left: 3px solid #c8a165;
}

/* Action Buttons */
.details-actions {
    display: flex;
    justify-content: center;
}

.action-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
}

.action-btn.primary {
    background: #c8a165;
    color: #000000;
}

.action-btn.primary:hover {
    background: #d4b175;
    transform: translateY(-1px);
}

.action-btn.secondary {
    background: #333;
    color: #ffffff;
    border: 1px solid #555;
}

.action-btn.secondary:hover {
    background: #444;
    border-color: #666;
}

/* Error State */
.details-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 40px 20px;
    color: #ff6b6b;
    text-align: center;
    min-height: 200px;
}

.details-error i {
    font-size: 2em;
    margin-bottom: 12px;
}

.details-error span {
    font-size: 0.9em;
    margin-bottom: 20px;
}

/* Membership button in error state */
.details-error .membership-redirect-btn {
    margin-top: 20px;
    width: 100%;
    max-width: 300px;
}

/* Status Badge */
.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 500;
}

.status-available {
    background: #2d5a2d;
    color: #4ade80;
}

.status-not-available {
    background: #5a2d2d;
    color: #f87171;
}

/* Price Styling */
#details-price {
    color: #c8a165;
    font-weight: bold;
}

/* Payment Dialog Styles */
.payment-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
}

.payment-dialog {
    background: #fff;
    border-radius: 12px;
    padding: 0;
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    position: relative;
}

.payment-dialog-header {
    background: #000;
    color: #fff;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.payment-dialog-header h3 {
    margin: 0;
    color: #c8a165;
    font-size: 1.4em;
}

.close-payment-dialog {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.8em;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.close-payment-dialog:hover {
    background: rgba(255, 255, 255, 0.1);
}

.payment-dialog-content {
    padding: 20px;
}

.lesson-summary {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #c8a165;
}

.lesson-summary h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.2em;
}

.lesson-summary p {
    margin: 5px 0;
    color: #666;
    font-size: 0.9em;
}

.payment-methods {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.payment-method-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid #ddd;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9em;
    font-weight: 500;
}

.payment-method-btn:hover {
    border-color: #c8a165;
    background: #f8f9fa;
}

.payment-method-btn.active {
    border-color: #c8a165;
    background: #c8a165;
    color: #fff;
}

.payment-method-btn i {
    font-size: 1.1em;
}

#payment-element-container {
    margin: 20px 0;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f8f9fa;
}

.payment-submit-btn {
    width: 100%;
    padding: 15px;
    background: #c8a165;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 10px;
}

.payment-submit-btn:hover {
    background: #b38b4f;
}

.payment-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.payment-error {
    background: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 6px;
    margin-top: 10px;
    font-size: 0.9em;
    border: 1px solid #f5c6cb;
}

/* Stripe Elements Styling */
#payment-element-container .StripeElement {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
}

#payment-element-container .StripeElement--focus {
    border-color: #c8a165;
    box-shadow: 0 0 0 1px #c8a165;
}

#payment-element-container .StripeElement--invalid {
    border-color: #dc3545;
}

/* Responsive Design */
@media (max-width: 480px) {
    .details-popup {
        width: 95vw;
        max-height: 85vh;
        border-radius: 8px;
    }
    
    .details-header {
        padding: 14px 16px;
    }
    
    .details-title {
        font-size: 1.2em;
    }
    
    .details-content {
        padding: 16px;
    }
    
    .info-row {
        padding: 5px 0;
    }
    
    .info-label {
        font-size: 0.8em;
        min-width: 70px;
    }
    
    .info-value {
        font-size: 0.85em;
    }
    
    .description-text {
        font-size: 0.85em;
        padding: 10px;
    }
    
    .details-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .action-btn {
        width: 100%;
        padding: 12px 20px;
    }

    .payment-dialog {
        width: 95%;
        margin: 10px;
    }
    
    .payment-methods {
        flex-direction: column;
    }
    
    .payment-dialog-header {
        padding: 15px;
    }
    
    .payment-dialog-content {
        padding: 15px;
    }
}

@media (max-width: 360px) {
    .details-popup {
        width: 98vw;
        border-radius: 6px;
    }
    
    .details-header {
        padding: 12px 14px;
    }
    
    .details-title {
        font-size: 1.1em;
    }
    
    .details-content {
        padding: 14px;
    }
    
    .info-label {
        font-size: 0.75em;
        min-width: 60px;
    }
    
    .info-value {
        font-size: 0.8em;
    }
}

/* Landscape Mode */
@media (max-height: 500px) and (orientation: landscape) {
    .details-popup {
        max-height: 90vh;
    }
    
    .details-content {
        padding: 16px 20px;
    }
    
    .details-info-grid {
        gap: 6px;
        margin-bottom: 16px;
    }
    
    .details-description {
        margin-bottom: 16px;
    }
    
    .details-actions {
        gap: 10px;
    }
    
    .action-btn {
        padding: 8px 16px;
    }
} 