/* =================================================================
   PRODUCT PAGE WIDGET - (Updated User-Friendly Design)
   ================================================================= */

/* Main Container */
#ksf-service-widget-container {
    border: 1px solid #e0e0e0; 
    padding: 25px; 
    border-radius: 12px;
    margin-top: 1.5em;
    background: #ffffff;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.07);
    font-family: 'Inter', sans-serif;
}

/* Step Headers */
.ksf-step h4 {
    display: flex;
    align-items: center;
    margin-top: 2em; 
    margin-bottom: 1.2em; 
    border-bottom: 1px solid #f0f0f0; 
    padding-bottom: 0.8em; 
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}
.ksf-step:first-child h4 { margin-top: 0; }

/* Numbered circles for steps */
.ksf-service-form {
    counter-reset: step-counter;
}
.ksf-step h4::before {
    content: counter(step-counter);
    counter-increment: step-counter;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #5d3e8a;
    color: #fff;
    font-weight: 600;
    margin-right: 15px;
    font-size: 14px;
    flex-shrink: 0;
}

/* Service Type Slider - Ensures it stays in a single scrollable line */
.ksf-types-grid {
    display: flex;
    flex-wrap: nowrap; /* Prevents wrapping to the next line */
    overflow-x: auto;  /* Allows horizontal scrolling */
    padding-bottom: 15px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #d1d1d1 #f1f1f1;
}
.ksf-types-grid::-webkit-scrollbar { height: 6px; }
.ksf-types-grid::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 10px; }
.ksf-types-grid::-webkit-scrollbar-thumb { background: #d1d1d1; border-radius: 10px; }
.ksf-types-grid::-webkit-scrollbar-thumb:hover { background: #b1b1b1; }

/* Service Type Cards */
.ksf-type-card {
    flex: 0 0 130px; /* Ensures cards have a fixed width */
    border: 2px solid #e0e0e0; 
    border-radius: 10px; 
    padding: 12px; 
    text-align: center; 
    cursor: pointer; 
    transition: all 0.25s ease-in-out;
    margin-right: 15px;
    position: relative;
    background: #fff;
}
.ksf-type-card:last-child { margin-right: 0; }
.ksf-type-card:hover { transform: translateY(-4px); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08); }
.ksf-type-card.selected {
    border-color: #5d3e8a;
    background-color: #f8f5fc;
    transform: translateY(-4px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}
/* Image styling for correct display */
.ksf-type-card img {
    width: 100%;
    height: 90px;
    object-fit: cover; /* Prevents image stretching */
    margin-bottom: 10px;
    border-radius: 6px;
}
.ksf-type-card span { font-weight: 500; display: block; font-size: 14px; line-height: 1.3; }
.ksf-type-card .ksf-selected-icon {
    display: none;
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    background-color: #5d3e8a;
    color: white;
    border-radius: 50%;
    font-size: 14px;
    line-height: 24px;
    transition: transform 0.2s ease;
    transform: scale(0.8);
}
.ksf-type-card.selected .ksf-selected-icon { display: flex; align-items: center; justify-content: center; transform: scale(1); }

/* Slot Selection List */
.ksf-slots-list { display: flex; flex-direction: column; gap: 12px; }
.ksf-slot-option {
    display: flex; align-items: center; border: 1px solid #e0e0e0; 
    padding: 14px 18px; border-radius: 8px; cursor: pointer; transition: all 0.2s ease-in-out;
}
.ksf-slot-option:hover { border-color: #b0b0b0; background: #fcfcfc; }
.ksf-slot-option.selected { border-color: #5d3e8a; background-color: #f8f5fc; }
.ksf-slot-option input[type="checkbox"] { display: none; }
.ksf-slot-option .ksf-checkbox-custom {
    width: 22px; height: 22px; border: 2px solid #d1d1d1; border-radius: 5px; margin-right: 15px;
    display: flex; align-items: center; justify-content: center; transition: all 0.2s; flex-shrink: 0;
}
.ksf-slot-option .ksf-checkbox-custom .ksf-checkbox-tick { display: none; font-weight: bold; color: #fff; transform: scale(0.8); }
.ksf-slot-option input:checked + .ksf-checkbox-custom { background-color: #5d3e8a; border-color: #5d3e8a; }
.ksf-slot-option input:checked + .ksf-checkbox-custom .ksf-checkbox-tick { display: block; }
.ksf-slot-option .slot-details { flex-grow: 1; font-size: 15px; }
.ksf-slot-option .slot-details strong { font-weight: 600; }
.ksf-slot-option ins { text-decoration: none; }
/* MRP (strikethrough price) styling */
.ksf-slot-option del {
    color: #dc3545; /* Red color for MRP */
    opacity: 0.9;
    margin-right: 8px;
    font-weight: 500;
}


/* Date Picker Fields */
.ksf-date-picker-fields { display: flex; gap: 4%; }
.ksf-date-picker-fields .ksf-date-input-wrapper { width: 48%; position: relative; }
.ksf-date-picker-fields .ksf-date-input-wrapper::before {
    content: '\f145'; font-family: 'Dashicons'; position: absolute; left: 14px; top: 50%;
    transform: translateY(-50%); color: #999; pointer-events: none;
}
.ksf-date-picker-fields input { width: 100%; cursor: pointer; padding-left: 40px !important; height: 44px; background: #fdfdfd; }

/* Date Skipping Styles for Pikaday Calendar */
#ksf-skip-calendar-container .pika-single { border: none; box-shadow: none; width: 100%; }
#ksf-skip-calendar-container .pika-table { width: 100%; }
#ksf-skip-calendar-container .pika-day { padding: 8px; border-radius: 50%; transition: all 0.2s ease; }
#ksf-skip-calendar-container .pika-day:hover { background-color: #f0f0f0; }
#ksf-skip-calendar-container .pika-day.is-disabled { opacity: 0.3; pointer-events: none; }
#ksf-skip-calendar-container .pika-day.is-skipped { background: #ffebee !important; color: #b71c1c !important; text-decoration: line-through; border-radius: 50% !important; }

/* Summary and Cart Section */
.ksf-summary-and-cart { margin-top: 30px; }
#ksf-price-summary { padding: 20px; background-color: #f7f9fc; border: 1px solid #eef2f8; border-radius: 10px; margin-bottom: 1.5em; }
.ksf-price-breakdown { list-style: none; margin: 0; padding: 0; }
.ksf-price-breakdown li {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e9e9e9;
    font-size: 15px;
}
.ksf-price-breakdown li:last-child { border-bottom: none; }
.ksf-price-breakdown li span:first-child { color: #555; }
.ksf-price-breakdown li span:last-child { font-weight: 600; color: #333; }
/* "You Save" styling - Colorful and prominent */
.ksf-price-breakdown li.ksf-saved-amount {
    color: #28a745; /* Green color for savings */
    font-size: 16px;
    background-color: #e9f7ef;
    padding: 10px 15px;
    border-radius: 5px;
    margin-top: 5px;
    margin-bottom: 5px;
}
.ksf-price-breakdown li.ksf-saved-amount span {
    color: inherit;
    font-weight: 700;
}
.ksf-price-breakdown li.ksf-total-price {
    font-size: 1.6em;
    padding-top: 15px;
    border-top: 2px solid #e0e0e0;
    margin-top: 10px;
}
.ksf-price-breakdown li.ksf-total-price span:last-child { color: #000; }
#ksf-add-to-cart-button {
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 600;
    padding: 12px;
    width: 100%;
}
#ksf-add-to-cart-button:disabled { opacity: 0.6; cursor: not-allowed; }
