/* Hide default WooCommerce quantity for calculator products */
.single-product .vloeren-calculator ~ .quantity {
    display: none !important;
}

/* Also hide any duplicate add to cart button */
.single-product form.cart .vloeren-calculator ~ .single_add_to_cart_button {
    display: none !important;
}

/* Vloeren Calculator - Frontend Styles */
/* Verberg de specifieke "Toevoegen aan winkelwagen" knop wanneer de calculator aanwezig is */
.single-product button[type="submit"][name="add-to-cart"].single_add_to_cart_button:not(.vc-add-to-cart) {
    display: none !important;
}

/* Of als de calculator via shortcode is geplaatst */
body:has(.vloeren-calculator) button[type="submit"][name="add-to-cart"].single_add_to_cart_button:not(.vc-add-to-cart) {
    display: none !important;
}

/* Specifiek voor value 12124 als je alleen deze knop wilt verbergen */
button[type="submit"][name="add-to-cart"][value="12124"].single_add_to_cart_button:not(.vc-add-to-cart) {
    display: none !important;
}
/* Alleen toepassen op frontend, niet in admin */
body:not(.wp-admin) .vloeren-calculator {
    border-radius: 8px;
    position: relative;
}

/* Discount Badge */
.vc-discount-badge {
  position: absolute;
  top: 12px;
  right: 0px;
  background: #eb0052;
  color: white;
  padding: 4px 12px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  box-shadow: none;
  animation: badge-bounce 1.5s ease-out;
  z-index: 10;
  font-size: 10px !important;
}

.vc-discount-percentage {
    font-size: 14px;
}

.vc-discount-text {
    font-size: 11px;
    letter-spacing: 0.5px;
}

@keyframes badge-bounce {
    0% {
        transform: scale(0) rotate(-10deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.1) rotate(5deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.vc-title {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px 0;
}

/* Input Row */
.vc-input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.vc-input-group,
.vc-result-group {
    display: flex;
    flex-direction: column;
}

.vc-input-group label,
.vc-result-group label {
    color: #222;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.vc-pakket-info {
    color: #4d4d4d;
    font-weight: 400;
    font-size: 13px;
}

/* Number Input */
#vc_oppervlakte {
    width: 100%;
    padding: 0px 15px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    transition: all 0.2s;
    -webkit-appearance: none;
    -moz-appearance: textfield;
}

#vc_oppervlakte::-webkit-inner-spin-button,
#vc_oppervlakte::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#vc_oppervlakte:focus {
    outline: none;
    border-color: #333;
}
/* Force checkbox naast tekst */
#vc-legservice-container {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px 20px;
    margin: 20px 0;
}

#vc-legservice-container .vc-checkbox-option {
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
}

#vc_legservice_checkbox {
    margin: 2px 0 0 0 !important;
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    flex-shrink: 0 !important;
    position: relative !important;
    top: 0 !important;
}

#vc-legservice-container .vc-checkbox-label {
    display: block !important;
    line-height: 1.5 !important;
}

#vc-legservice-container .vc-checkbox-label strong {
    display: block !important;
    margin-bottom: 4px !important;
    font-size: 16px !important;
    color: #333 !important;
}

#vc-legservice-container .vc-checkbox-label small {
    display: block !important;
    color: #666 !important;
    font-size: 14px !important;
}
/* Quantity Controls */
.vc-quantity-controls {
  display: flex;
  align-items: center;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
  height: 47px;
}

.vc-qty-btn {
    width: 42px;
    height: 100%;
    border: none;
    background: #f5f5f5;
    color: #666;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border-right: 1px solid #ddd;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.vc-qty-btn.vc-qty-plus {
    border-right: none;
    border-left: 1px solid #ddd;
}

.vc-qty-btn:hover:not(:disabled) {
    background: #e8e8e8;
    color: #333;
}

.vc-qty-btn:active:not(:disabled) {
    background: #ddd;
}

.vc-qty-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.vc-qty-input {
    flex: 1;
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    background: transparent;
    color: #333;
    -webkit-appearance: none;
    -moz-appearance: textfield;
	border-style:none !important;
}

.vc-qty-input::-webkit-inner-spin-button,
.vc-qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Snijverlies Options */
.vc-snijverlies-row {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.vc-radio-option {
    flex: 1;
    position: relative;
    cursor: pointer;
}

.vc-radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.vc-radio-label {
    display: block;
    padding: 10px 15px;
    text-align: center;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    transition: all 0.2s;
}

.vc-radio-option input[type="radio"]:checked + .vc-radio-label {
    background: #000;
    border-color: #000;
    color: white;
}

.vc-radio-check {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    font-size: 14px;
    display: none;
}

.vc-radio-option input[type="radio"]:checked ~ .vc-radio-check {
    display: block;
    color: white;
}

/* Price Section */
.vc-price-section {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
}

.vc-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.vc-price-row:last-of-type {
    margin-bottom: 5px;
    padding-top: 8px;
    border-top: 1px solid #eee;
}

.vc-price-label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.vc-price-display {
    display: flex;
    align-items: center;
    gap: 10px;
}

.vc-price-old,
.vc-price-total-old {
    font-size: 16px;
    color: #999;
    text-decoration: line-through;
}

.vc-price-per-m2 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.vc-price-current {
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.vc-werkelijke-m2 {
    font-weight: 600;
    color: #333;
}

/* Force display of werkelijke row when it has content */
.vc-werkelijke-row {
    display: flex !important;
}

.vc-werkelijke-row[style*="display: none"] {
    display: none !important;
}

.vc-price-note {
    font-size: 12px;
    color: #999;
}

/* Stock & Delivery Info */
.vc-stock-info {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #5cb85c;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
}

.vc-stock-icon {
    width: 16px;
    height: 16px;
    background: #5cb85c;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

.vc-delivery-info {
    color: #666;
    font-size: 13px;
    margin-bottom: 5px;
}

/* Buttons */
.vc-add-to-cart {
    width: 100%;
    padding: 12px 20px;
    background: #333;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 15px;
    margin-top: 20px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.vc-add-to-cart:hover:not(:disabled) {
    background: #222;
}

.vc-add-to-cart:active:not(:disabled) {
    background: #111;
}

.vc-add-to-cart:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Secondary Actions */
.vc-secondary-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.vc-action-btn {
    padding: 10px 15px;
    background: white;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.vc-action-btn:hover {
    border-color: #333;
    background: #f8f8f8;
}

.vc-action-btn:active {
    background: #eee;
}

/* Modal */
.vc-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: 9999;
    padding: 20px;
}

.vc-modal-content {
    background: white;
    border-radius: 8px;
    padding: 25px;
    max-width: 450px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.vc-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vc-modal-close:hover {
    color: #333;
}

.vc-modal h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 20px;
    font-weight: 600;
}

/* Form */
.vc-form-group {
    margin-bottom: 15px;
}

.vc-form-group label {
    display: block;
    margin-bottom: 6px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.vc-form-group input,
.vc-form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s;
    -webkit-appearance: none;
}

.vc-form-group input:focus,
.vc-form-group textarea:focus {
    outline: none;
    border-color: #333;
}

/* Form Row for two columns */
.vc-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .vc-form-row {
        grid-template-columns: 1fr;
    }
}

/* Quote Summary */
.vc-quote-summary {
    background: #f8f8f8;
    border-radius: 4px;
    padding: 15px;
    margin: 20px 0;
}

.vc-quote-summary h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
}

.vc-quote-summary p {
    margin: 6px 0;
    color: #666;
    font-size: 14px;
}

.vc-quote-summary strong {
    color: #333;
}

.vc-submit-quote {
    width: 100%;
    padding: 12px;
    background: #333;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-appearance: none;
    touch-action: manipulation;
}

.vc-submit-quote:hover {
    background: #222;
}

.vc-submit-quote:active {
    background: #111;
}

/* Sample specific styles */
.vc-sample-info {
    background: #f8f8f8;
    border-radius: 4px;
    padding: 15px;
    margin: 20px 0;
}

.vc-sample-info p {
    margin: 8px 0;
    color: #333;
}

.vc-sample-note {
    color: #5cb85c;
    font-size: 13px;
}

.vc-submit-sample {
    width: 100%;
    padding: 12px;
    background: #333;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-appearance: none;
    touch-action: manipulation;
}

.vc-submit-sample:hover {
    background: #222;
}

.vc-submit-sample:active {
    background: #111;
}

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

/* Responsive - Mobile */

@media (max-width: 768px) {
    body:not(.wp-admin) .vloeren-calculator {
        padding: 0px;
    }
    
    .vc-input-row {
        grid-template-columns: 0.8fr 1fr;
        gap: 15px;
    }
    
    .vc-snijverlies-row {
        flex-direction: column;
    }
    
    .vc-secondary-actions {
        grid-template-columns: 1fr;
    }
    
    .vc-price-current {
        font-size: 18px;
    }
    
    /* Ensure buttons are easily tappable on mobile */
    .vc-qty-btn {
        width: 50px;
        font-size: 20px;
    }
    
    .vc-add-to-cart,
    .vc-action-btn {
        padding: 14px 20px;
        font-size: 16px;
    }
    
    /* Fix modal on mobile */
    .vc-modal {
        padding: 10px;
    }
    
    .vc-modal-content {
        padding: 20px;
    }
    
    .vc-modal-close {
        top: 10px;
        right: 10px;
    }
	 .vc-discount-badge {
    position: absolute;
top: -39px !important;
    right: -12px !important;
    background: #eb0052;
    color: white;
    padding: 4px 12px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    box-shadow: none;
    animation: badge-bounce 1.5s ease-out;
    z-index: 10;
    font-size: 10px !important;
  }
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
    .vc-qty-btn:active:not(:disabled) {
        background: #ddd;
    }
    
    .vc-add-to-cart:active:not(:disabled) {
        background: #111;
    }
    
    .vc-action-btn:active {
        background: #eee;
    }
}

/* Admin Styles */
.vc-status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
}

.vc-status-new {
    background: #d9f7be;
    color: #52c41a;
}

.vc-status-contacted {
    background: #ffe7ba;
    color: #fa8c16;
}

.vc-status-converted {
    background: #d9f7be;
    color: #52c41a;
}

.vc-status-cancelled {
    background: #ffccc7;
    color: #f5222d;
}

.vc-status-sent {
    background: #d9f7be;
    color: #52c41a;
}

/* Hide default WooCommerce quantity for calculator products */
.single-product .product-type-simple form.cart .quantity:not(.vc-quantity-controls) {
    display: none !important;
}

/* Price suffix styling for m² */
.vc-price-suffix {
    font-size: 0.75em;
    font-weight: normal;
    color: #666;
    margin-left: 2px;
}