/**
 * Bundles & Mix Builder Frontend Styles
 *
 * @package Product_Configurator
 */

.pc-mix-builder {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.pc-form-section {
    margin-bottom: 20px;
}

.pc-form-section label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.pc-form-section input[type="number"],
.pc-form-section select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.pc-ingredients-section {
    margin-bottom: 20px;
}

.pc-ingredients-section h3 {
    margin-bottom: 10px;
    color: #333;
}

.pc-ingredients-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
    background: white;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.pc-ingredients-table th,
.pc-ingredients-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.pc-ingredients-table th {
    background: #f5f5f5;
    font-weight: bold;
    color: #333;
}

.pc-ingredients-table .pc-product-select,
.pc-ingredients-table .pc-percentage-input {
    width: 100%;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.pc-weight-display,
.pc-subtotal-display {
    font-weight: bold;
    color: #27ae60;
}

.pc-remove-ingredient {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.pc-remove-ingredient:hover {
    background: #c0392b;
}

.pc-add-ingredient {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.pc-add-ingredient:hover {
    background: #2980b9;
}

.pc-container-section {
    margin-bottom: 20px;
}

.pc-container-section select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.pc-summary-section {
    background: white;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.pc-total-price {
    font-size: 18px;
    font-weight: bold;
    color: #27ae60;
    text-align: center;
}

.pc-validation-messages {
    margin-top: 10px;
}

.pc-error {
    color: #e74c3c;
    font-weight: bold;
    margin: 5px 0;
}

.pc-warning {
    color: #f39c12;
    font-weight: bold;
    margin: 5px 0;
}

.pc-form-actions {
    text-align: center;
}

.pc-form-actions button {
    margin: 0 10px;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
}

#pc-calculate-price {
    background: #f39c12;
    color: white;
}

#pc-calculate-price:hover {
    background: #e67e22;
}

#pc-add-to-cart {
    background: #27ae60;
    color: white;
}

#pc-add-to-cart:hover:not(:disabled) {
    background: #229954;
}

#pc-add-to-cart:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.pc-recipe-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.pc-recipe-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.pc-save-recipe,
.pc-load-recipe {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pc-save-recipe input {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    flex: 1;
    min-width: 150px;
}

.pc-recipes-list {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin-top: 10px;
}

.pc-recipe-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pc-recipe-item:last-child {
    border-bottom: none;
}

.pc-recipe-item h5 {
    margin: 0 0 5px 0;
    color: #333;
}

.pc-recipe-item small {
    color: #666;
}

.pc-recipe-item button {
    margin-left: 5px;
    padding: 4px 8px;
    font-size: 12px;
}

/* Bundle display styles */
.pc-bundle-info {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
}

.pc-bundle-info h3 {
    margin-top: 0;
    color: #495057;
    border-bottom: 2px solid #17a2b8;
    padding-bottom: 10px;
}

.pc-bundle-components {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.pc-bundle-components li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #dee2e6;
}

.pc-bundle-components li:last-child {
    border-bottom: none;
}

.pc-component-quantity {
    font-weight: bold;
    color: #17a2b8;
    min-width: 30px;
}

.pc-component-name {
    flex: 1;
    margin: 0 15px;
    font-weight: 500;
}

.pc-component-price {
    font-weight: bold;
    color: #28a745;
}

.pc-bundle-discount {
    background: #d4edda;
    color: #155724;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #c3e6cb;
    margin: 15px 0 0 0;
    font-weight: bold;
}

/* Responsive design */
@media (max-width: 768px) {
    .pc-mix-builder {
        padding: 10px;
    }

    .pc-ingredients-table {
        font-size: 14px;
    }

    .pc-ingredients-table th,
    .pc-ingredients-table td {
        padding: 8px;
    }

    .pc-form-actions button {
        display: block;
        width: 100%;
        margin: 5px 0;
    }

    .pc-recipe-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .pc-save-recipe input {
        min-width: auto;
    }

    .pc-recipe-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .pc-recipe-item button {
        align-self: flex-end;
    }
}
