/* Form Container with Yellow Border */
.cal__box { box-shadow: 0 4px 6px rgb(51 51 51 / 16%); background: #f5f5f5; border: 6px solid #ffe598; border-radius: 30px; padding: 50px; max-width: 1000px; margin: auto; } 

/* Form Layout (One Line) */
#price-calculator-form { display: flex; align-items: center; gap: 15px; flex-wrap: nowrap; justify-content: flex-start; width: 100%; } 

/* Styling for each input group */
.form-group { display: flex; flex-direction: column; position: relative; } 

/* Input and select styles */
#material-select, #material-qty, #preview-extra { padding: 10px; font-size: 16px; border: 2px solid #ccc; border-radius: 10px; background: #fff; } 

/* Select dropdown width */
#material-select { width: 380px; } 

.horizontal-label-group { flex-direction: row !important; align-items: center; gap: 10px; }

.horizontal-label-group label { white-space: nowrap; font-weight: 500; margin: 0; }

.horizontal-label-group input { flex: 1; }

.extra-error{ color: red; font-size: 14px; margin-top: 3px; position: absolute; left: 0; top: 100%; white-space: nowrap; display: ruby-text; padding-left: 100px; }
/* Quantity input field */
#material-qty { width: 150px; margin-right:10px; } 

/* Calculate Price Button */
#calculate-price { background-color: #29476B; color: white; padding: 10px 15px; font-size: 16px; border: none; cursor: pointer; border-radius: 5px; white-space: nowrap; } 
#calculate-price:hover { background-color: #1f3651; } 

/* Error Styling */
.error-border { border: 2px solid red !important; outline: none; } 
.error-message { color: red; font-size: 14px; display: none; margin-top: 3px; position: absolute; left: 0; top: 100%; white-space: nowrap; } 
.qty-wrapper { position: relative; display: inline-block; width: 100%; }

/* Add Item Container (Hidden by Default) */
.items-container { display: none; flex-wrap: wrap; gap: 10px; margin-top: 15px; width: 100%; justify-content: center; background: #ffffff; padding: 15px; border-radius: 10px; border: 6px solid #ffe598; } 

/* Single Item in Added List */
.item-container { background-color: #f9f9f9; padding: 10px; border-radius: 5px; display: flex; align-items: center; gap: 10px; border: 1px solid #ddd; } 

/* Remove Item Button */
.remove { color: red; font-size: 18px; cursor: pointer; } 

/* Total Block (Green & Centered) */
.total-container { display: none; width: 50%; background: #3cb371; border-radius: 10px; text-align: center; padding: 15px; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); margin: 20px auto; border: 6px solid #ffe598; } 

/* Total Text Styling */
.total__item { font-weight: bold; text-align: center; color: #fff; font-size: 18px; } 
#total-amount { font-size: 34px; color: #ffffff; } 

/* Styling for Total Label (New Line Text) */
.total-label { display: block; font-size: 16px; font-weight: normal; color: #ffffff; margin-top: 5px; } 

/* Print PDF Button */
#print-pdf { background-color: #28a745; color: white; padding: 10px; border: none; cursor: pointer; margin-top: 10px; border-radius: 5px; } 
#print-pdf:disabled { background-color: gray; cursor: not-allowed; } 
#print-pdf:hover { background-color: #218838; } 

/* Quantity Input Wrapper */
.qty-wrapper { position: relative; display: inline-block; } 

/* Unit Label for Quantity Input */
.input-unit { content: "g"; position: absolute; top: 50%; transform: translateY(-50%); font-size: 20px; font-weight: 500; color: #333; pointer-events: none; } 

/* Remove number input arrows in some browsers */
.form-group input[type="number"]::-webkit-inner-spin-button, 
.form-group input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; } 
.form-group input[type="number"] { -moz-appearance: textfield; } 


/* Styling for Customer Fields */
.customer-details { margin-bottom: 30px; background: #fff; padding: 20px; border-radius: 10px; border: 2px solid #ffe598;cbox-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); }

/* Each row containing input fields */
.form-row { display: flex; gap: 20px; margin-bottom: 15px; }

/* Input Field Styling */
.form-group { flex: 1; }

.form-input { width: 100%; padding: 12px; font-size: 16px; border: 2px solid #ccc; border-radius: 8px; background: #fff; transition: all 0.3s ease-in-out;}

/* Hover and Focus Effect */
.form-input:hover, .form-input:focus { border-color: #29476B; /* Dark blue highlight */ box-shadow: 0 0 5px rgba(41, 71, 107, 0.3); outline: none; }

/* Kundenbonus Field Styling */
#bonus-container { margin-top: 20px; text-align: center; }

#kundenbonus { width: 100%; padding: 12px; font-size: 16px; border: 2px solid #ccc; border-radius: 8px; background: #fff; transition: all 0.3s ease-in-out; }

/* Hover and Focus Effect */
#kundenbonus:hover, #kundenbonus:focus { border-color: #29476B; box-shadow: 0 0 5px rgba(41, 71, 107, 0.3); outline: none; }


/* Styles for each selected item */
.elementor-shortcode #selected-items .item__single { display: flex; width: 100%; font-weight: bold; overflow: hidden; margin-bottom: 10px; border-radius: 10px; box-shadow: 0 3px 6px rgb(0 0 0 / 16%); text-align: center; background: #fff; font-size: 15px; }  

/* Equal width spans inside item */
.elementor-shortcode #selected-items .item__single span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-right: 1px dashed #cfcfcf; font-weight: 500; display: flex; align-items: center; justify-content: center; padding: 10px; min-width: 100px; display: block;}  

.elementor-shortcode #selected-items .item__single span.extra-filed-value:after { content: "Legierung"; }
.elementor-shortcode #selected-items .item__single span.extra-field-auf::after { content: "Auflage"; }
span.extra-filed-value { border-left: 1px dashed #cfcfcf; }

/* Transition effect and spacing */
.elementor-shortcode div#selected-items { transition: transform ease 1s; margin-top: 30px; font-weight: 200; clear: both; font-size: 13px; }  

/* Container styles */
.elementor-shortcode #selected-items .item-container { position: relative; font-weight: 200; margin: 15px; }  

/* Remove button styling */
.elementor-shortcode #selected-items .remove { font-size: 26px; background: #333; border-radius: 50%; display: inline-block; width: 30px; height: 30px; line-height: 30px; text-align: center; cursor: pointer; position: absolute; right: 15px; top: 22px; color: #fff; }  

/* Default after text styling */
#selected-items .item__single span:after { display: block; font-size: 11px; font-weight: 200; }  

/* Label for first column */
.elementor-shortcode #selected-items .item__single span:nth-child(1):after { content: "Material"; }  

/* Label for second column */
.elementor-shortcode #selected-items .item__single span:nth-child(2):after { content: "Preis / g " attr(data-unit); }  

/* Remove border from third column */
.elementor-shortcode #selected-items .item__single span:nth-child(3) { border: 0; }  

/* Label for third column */
.elementor-shortcode #selected-items .item__single span:nth-child(3):after { content: "Gewicht"; }  

/* Background for fourth column */
.elementor-shortcode #selected-items .item__single span:last-of-type { background: #3cb371; color: #ffff; border: 0; }  

/* Label for fourth column */
.elementor-shortcode #selected-items .item__single span:last-of-type::after { content: " Summe";}

/* Remove right border from last column */
.elementor-shortcode #selected-items .item__single span:last-child { border-right: none; }  



/* Responsive Design for Small Screens */

@media screen and (max-width: 480px) { 
    .total-container { width: 100%; font-size: 12px; padding: 8px; } 
    #total-amount { font-size: 20px; } 
} 

@media screen and (max-width: 600px) { 
    #price-calculator-form { flex-direction: column; align-items: stretch; } 
    #material-select, #material-qty, #calculate-price { width: 100%; } 
    .form-group { width: 100%; }
    #price-calculator-form { flex-direction: column; align-items: stretch; } 
    #material-select, #material-qty, #calculate-price { width: 100%; } 
    .error-message { font-size: 12px; white-space: normal; width: 100%; text-align: left; }

}

@media screen and (max-width: 768px) {
    .form-row { flex-direction: column; }
    .elementor-shortcode #selected-items .item__single { flex-direction: column; text-align: left; padding: 10px; }
    .elementor-shortcode #selected-items .item__single span { width: 100%; border-right: none; border-bottom: 1px solid #cfcfcf; }
    .elementor-shortcode #selected-items .item__single span:last-child { border-bottom: none; }
    .elementor-shortcode #selected-items .remove { right: 10px; top: 10px; width: 25px; height: 25px; line-height: 25px; font-size: 20px; }
    .input-unit {right: 8px;}
    span.extra-filed-value { border-left:none; border-top: 1px solid #cfcfcf; }
    .qty-wrapper { width: 100%; } 
    .error-message { font-size: 12px; position: relative; top: 5px; } 
    .total-container { width: 90%; padding: 10px; font-size: 14px; } 
    #total-amount { font-size: 24px; } 
    #print-pdf { font-size: small; padding: 8px; } 
}
