/* Baby Börse Brokstedt - Stylesheet */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    text-align: center;
}

header h1 {
    color: #667eea;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.kasse-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2em;
}

.kasse-nummer {
    background: #667eea;
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: bold;
}

.datum {
    color: #666;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Barcode Section */
.barcode-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.input-group label {
    display: block;
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.barcode-input-container {
    display: flex;
    gap: 15px;
    align-items: center;
}

#barcode-input {
    flex: 1;
    padding: 15px 20px;
    font-size: 1.3em;
    border: 3px solid #e0e0e0;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-family: monospace;
}

#barcode-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Buttons */
.btn {
    padding: 15px 25px;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
}

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

/* Article Display */
.article-display {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border-left: 5px solid #28a745;
}

.article-info h3 {
    color: #333;
    font-size: 1.5em;
    margin-bottom: 10px;
}

.article-info p {
    color: #666;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.article-details {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.article-details span {
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
}

.price {
    background: #28a745;
    color: white;
}

.size {
    background: #17a2b8;
    color: white;
}

.seller {
    background: #ffc107;
    color: #333;
}

.article-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Cart Section */
.cart-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.cart-section h2 {
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-items {
    min-height: 100px;
    margin-bottom: 20px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 10px;
    border-left: 4px solid #667eea;
    gap: 32px; /* Abstand zwischen Preis und Remove-Button */
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: bold;
    color: #333;
}

.cart-item-details {
    color: #666;
    font-size: 0.9em;
}

.cart-item-price {
    font-weight: bold;
    color: #28a745;
    font-size: 1.1em;
}

.cart-item-remove {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
}

.empty-cart {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px 20px;
}

.cart-summary {
    border-top: 2px solid #e0e0e0;
    padding-top: 20px;
}

.total {
    text-align: right;
    font-size: 1.3em;
    margin-bottom: 20px;
}

.cart-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* Bottom Navigation */
.bottom-nav {
    background: white;
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-top: 20px;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 10px;
}

.nav-item {
    padding: 12px 20px;
    border-radius: 25px;
    text-decoration: none;
    color: #666;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
    min-width: 120px;
}

.nav-item:hover {
    background: #f8f9fa;
    color: #667eea;
    transform: translateY(-2px);
}

.nav-item.active {
    background: #667eea;
    color: white;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    text-align: center;
}

.modal-content h2 {
    color: #333;
    margin-bottom: 20px;
}

.payment-summary {
    margin-bottom: 30px;
    font-size: 1.2em;
}

.payment-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.payment-modal-content {
    max-width: 400px;
    margin: 0 auto;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(102,126,234,0.15);
    text-align: center;
    background: #fff;
    padding: 36px 28px 32px 28px;
}
.payment-summary p {
    font-size: 1.15em;
    margin-bottom: 6px;
}
.payment-cash-group {
    margin: 24px 0 18px 0;
}
.payment-label {
    font-size: 1.05em;
    font-weight: bold;
    margin-bottom: 8px;
    display: block;
}
.payment-cash-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}
.payment-cash-input {
    font-size: 1.2em;
    padding: 10px 14px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    width: 120px;
    text-align: right;
}
.payment-calc-btn {
    font-size: 1em;
    padding: 10px 16px;
    border-radius: 8px;
}
.change-info {
    margin-top: 14px;
    font-size: 1.25em;
    font-weight: 500;
    color: #28a745;
    display: none;
    justify-content: center;
    align-items: flex-end;
    gap: 10px;
    min-height: 38px;
}
.change-info.error {
    color: #dc3545;
}
.change-label {
    font-size: 1.1em;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.change-amount {
    font-size: 1.7em;
    font-weight: bold;
    margin-left: 8px;
    letter-spacing: 1px;
    line-height: 1.1;
}
.payment-actions-custom {
    display: flex;
    flex-direction: column;
    gap: 13px;
    margin-top: 24px;
}
.payment-confirm-change, .payment-confirm-pay {
    font-size: 1.08em;
    padding: 13px 0;
    border-radius: 10px;
    width: 100%;
}
.payment-confirm-pay {
    opacity: 0.7;
}
.payment-confirm-pay:enabled {
    opacity: 1;
}
.payment-cancel {
    font-size: 1em;
    padding: 10px 0;
    border-radius: 10px;
    width: 100%;
    background: #6c757d;
    color: white;
}
@media (max-width: 600px) {
    .payment-modal-content {
        max-width: 98vw;
        padding: 10px;
    }
    .payment-cash-row {
        flex-direction: column;
        gap: 8px;
    }
    .payment-cash-input {
        width: 100%;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    .kasse-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .barcode-input-container {
        flex-direction: column;
    }
    
    .article-details {
        flex-direction: column;
        gap: 10px;
    }
    
    .cart-actions {
        flex-direction: column;
    }
    
    .bottom-nav {
        flex-direction: column;
    }
    
    .nav-item {
        min-width: auto;
    }
}

/* Animationen */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.article-display {
    animation: fadeIn 0.3s ease;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Success/Error Messages */
.message {
    padding: 15px;
    border-radius: 10px;
    margin: 10px 0;
    font-weight: bold;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.blinking {
    animation: blinking 1s linear infinite;
}

@keyframes blinking {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}
