/* Gastro Rechner - Frontend Styles */

.gastro-rechner-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
}

.gastro-rechner {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.rechner-header {
    background: linear-gradient(135deg, #ff6600 0%, #ff8800 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.rechner-header h1 {
    margin: 0 0 15px 0;
    font-size: 24px;
}

.rechner-display {
    background: rgba(0, 0, 0, 0.1);
    padding: 15px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rechner-display-label {
    font-size: 14px;
    opacity: 0.9;
}

.rechner-display-value {
    font-size: 32px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

/* Action Buttons oben */
.rechner-actions-top {
    padding: 12px 15px;
    background: #f5f5f5;
    border-bottom: 2px solid #ff6600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rechner-actions-top .button {
    padding: 0 16px;
    height: 56px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.2;
    white-space: nowrap;
}

#rechner-pfand,
#rechner-wechselgeld {
    flex: 1;
}

#rechner-pfand {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
}

#rechner-pfand:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

#rechner-wechselgeld {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: white;
}

#rechner-wechselgeld:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

#rechner-reset {
    flex: 0 0 auto;
    height: 44px;
    padding: 0 14px;
    font-size: 13px;
}

/* Produkt-Bereich */
.rechner-products {
    padding: 20px;
}

/* Kategorie Tabs */
.rechner-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.rechner-tab {
    background: #f0f0f0;
    border: 2px solid #ddd;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: #555;
}

.rechner-tab:hover {
    border-color: #ff6600;
    color: #ff6600;
}

.rechner-tab.active {
    background: linear-gradient(135deg, #ff6600 0%, #ff8800 100%);
    border-color: #ff6600;
    color: white;
}

.rechner-tab-panel {
    display: none;
}

.rechner-tab-panel.active {
    display: block;
}

/* Produkt Buttons */
.rechner-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.rechner-button {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
}

.rechner-button:hover {
    background: linear-gradient(135deg, #ff6600 0%, #ff8800 100%);
    color: white;
    border-color: #ff6600;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 102, 0, 0.3);
}

.rechner-button:active {
    transform: translateY(0);
}

.button-name {
    font-size: 14px;
    font-weight: 600;
}

.button-price {
    font-size: 16px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

/* Items List */
.rechner-items {
    padding: 20px;
    border-top: 1px solid #eee;
    background: #f9f9f9;
    min-height: 100px;
}

.rechner-items h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
}

.rechner-items-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.rechner-items-list li {
    background: white;
    border: 1px solid #eee;
    border-radius: 6px;
    margin-bottom: 10px;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.rechner-item-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 15px;
}

.item-count {
    background: linear-gradient(135deg, #ff6600 0%, #ff8800 100%);
    color: white;
    font-weight: 900;
    font-size: 18px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(255, 102, 0, 0.3);
    font-family: 'Courier New', monospace;
}

.item-name {
    font-weight: 600;
    color: #333;
    flex: 1;
}

.item-price {
    font-weight: bold;
    color: #ff6600;
    font-family: 'Courier New', monospace;
    min-width: 60px;
    text-align: right;
}

.item-minus {
    background: linear-gradient(135deg, #ff6600 0%, #ff8800 100%);
    color: white;
    border: none;
    border-radius: 4px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(255, 102, 0, 0.2);
}

.item-minus:hover {
    background: linear-gradient(135deg, #e55a00 0%, #ff7700 100%);
    box-shadow: 0 4px 10px rgba(255, 102, 0, 0.4);
    transform: scale(1.05);
}

/* Modal Styles */
.gastro-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.gastro-modal-content {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.gastro-modal-content h2 {
    margin: 0 0 10px 0;
    font-size: 22px;
    color: #333;
}

.gastro-modal-content p {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 16px;
}

.gastro-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.gastro-modal-actions .button {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    flex: 1;
    max-width: 150px;
}

.gastro-modal-actions .button-primary {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: white;
}

.gastro-modal-actions .button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.gastro-modal-actions .button-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
}

.gastro-modal-actions .button-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .gastro-rechner-container {
        padding: 10px;
    }
    
    .rechner-header {
        padding: 15px;
    }
    
    .rechner-header h1 {
        font-size: 20px;
        margin-bottom: 10px;
    }
    
    .rechner-display-value {
        font-size: 28px;
    }
    
    .rechner-products {
        padding: 15px;
    }

    .rechner-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .rechner-button {
        padding: 12px;
        font-size: 12px;
    }
    
    .button-price {
        font-size: 14px;
    }
    
    .rechner-items {
        padding: 15px;
        min-height: 80px;
    }
    
    .rechner-actions-top {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 12px;
    }

    #rechner-pfand,
    #rechner-wechselgeld {
        flex: 1 1 40%;
        height: 52px;
        font-size: 14px;
    }

    #rechner-reset {
        flex: 1 1 100%;
        height: 38px;
        font-size: 13px;
    }
}

/* Wechselgeld Modal */
.wechselgeld-modal-content {
    max-width: 400px;
}

.wechselgeld-summe {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

.wechselgeld-summe span {
    font-weight: bold;
    color: #333;
    font-family: 'Courier New', monospace;
    font-size: 20px;
}

.wechselgeld-quick-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.wechselgeld-quick {
    flex: 1;
    background: #f0f0f0;
    border: 2px solid #ddd;
    border-radius: 6px;
    padding: 12px 8px;
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.wechselgeld-quick:hover {
    background: linear-gradient(135deg, #ff6600 0%, #ff8800 100%);
    color: white;
    border-color: #ff6600;
}

.wechselgeld-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

.wechselgeld-input-row label {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

#wechselgeld-input {
    width: 130px;
    padding: 10px 12px;
    font-size: 22px;
    font-family: 'Courier New', monospace;
    border: 2px solid #ddd;
    border-radius: 6px;
    text-align: right;
}

#wechselgeld-input:focus {
    outline: none;
    border-color: #ff6600;
    box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.15);
}

.wechselgeld-input-row span {
    font-size: 22px;
    font-weight: bold;
    color: #333;
}

.wechselgeld-result {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 18px 22px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    min-height: 68px;
    transition: background 0.2s, color 0.2s;
}

.wechselgeld-result #wechselgeld-result-label {
    font-size: 16px;
    color: inherit;
}

.wechselgeld-result #wechselgeld-result-value {
    font-size: 30px;
    font-family: 'Courier New', monospace;
}

.wechselgeld-result.positive {
    background: #d4edda;
    color: #155724;
}

.wechselgeld-result.negative {
    background: #f8d7da;
    color: #721c24;
}

.wechselgeld-result.exact {
    background: #cce5ff;
    color: #004085;
    justify-content: center;
}

/* Offline-Hinweis */
.gastro-offline-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
    text-align: center;
}

/* Loading Spinner Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
