/*
    The #payment-form-container rule (with max-width: 650px)
    has been DELETED from this file.
*/

.form-control:focus, .form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}
#payment-element {
    margin-bottom: 25px;
}
#payment-message {
    margin-top: 15px;
    font-weight: 500;
    font-size: 0.9rem;
}
.cost-summary {
    background-color: #f8f9fa;
    padding: 1.25rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
}
.cost-summary strong.total-label {
    color: #0d6efd;
}
.cost-summary .value {
    font-weight: bold;
}
.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-left-color: #ffffff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-right: 10px;
}
.spinner.hidden {
    display: none;
}
#submit.btn-primary:disabled {
    background-color: #6c757d;
    border-color: #6c757d;
    cursor: not-allowed;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.line-item {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
}
.discount {
    color: #198754;
}
.service-type-selection {
    text-align: center;
    width: 100%;
}
fieldset {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
legend {
    float: none;
    width: auto;
    padding: 0 10px;
    font-size: 1.2rem;
    font-weight: 500;
}
#mailInRedirectContent {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 20px;
    padding: 1.5rem;
    border: 2px dashed #0d6efd;
    border-radius: 0.5rem;
    background-color: #e7f1ff;
    text-align: center;
}
.service-card {
  cursor: pointer;
  border: 2px solid #e9ecef; /* Default light border */
  transition: all 0.2s ease-in-out;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Style for the selected card */
.service-type-selection .btn-check:checked + .card {
  border-color: #0d6efd; /* Bright blue border */
  background-color: #e7f1ff; /* Light blue background */
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

/* Hide the radio button itself */
.service-type-selection .btn-check {
  display: none;
}
/* --- Flatpickr Wrapper Fix --- */
.flatpickr-wrapper {
    position: relative;
}
.flatpickr-wrapper .flatpickr-clear {
    position: absolute;
    right: 1rem;
    top: 0.85rem;
    z-index: 5;
    font-size: 0.75rem;
    padding: 0.1rem 0.4rem;
}
/* Adjust sticky positioning */
.sticky-summary {
    top: 2rem;
}

/* Default hidden states for logic elements */
#costSummarySection,
#cost-lines,
#pricePerBladeLine,
#serviceCreditLine,
#costCalculationMessage,
#notServiceableMessage,
#reassurance-block,
#payment-element-container {
    display: none;
}

/* ======================================================== */
/* SEAMLESS INPUT GROUP & VALIDATION FIXES               */
/* ======================================================== */

/* 1. Ensure icons are perfectly centered */
.input-group-text {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 2. Validation Color Propagation (The "Seamless" Magic) */
/* When the input (sibling) is VALID (green) */
.input-group:has(.form-control.is-valid) .input-group-text,
.input-group:has(.form-select.is-valid) .input-group-text {
    border-color: #198754;     /* Green Border */
    color: #198754;            /* Green Icon */
}

/* When the input (sibling) is INVALID (red) */
.input-group:has(.form-control.is-invalid) .input-group-text,
.input-group:has(.form-select.is-invalid) .input-group-text {
    border-color: #dc3545;     /* Red Border */
    color: #dc3545;            /* Red Icon */
}

/* 3. Focus Ring Fix */
/* When input is focused, color the icon border blue to match */
.input-group:focus-within .input-group-text {
    border-color: #86b7fe;
    z-index: 3; /* Bring above neighbors */
}

/* 4. Fix Validation Icon Overlap in Dropdowns */
.form-select.is-valid, .form-select.is-invalid {
    background-position: right 1.5rem center; /* Move checkmark/exclamation away from text */
}

/* Fallback for older browsers (optional, simple border fix) */
.form-control.is-valid, .form-select.is-valid {
    border-left: 1px solid #198754 !important; /* Restore left border if separated */
}
.form-control.is-invalid, .form-select.is-invalid {
    border-left: 1px solid #dc3545 !important;
}
/* But when "Seamless" (merged), we hide that left border again if :has is supported */
/* CORRECTED SEAMLESS LOGIC */
@supports selector(:has(*)) {
    /* ONLY remove the left border if the input is inside an .input-group (like the Search bar) */
    .input-group > .form-control.is-valid, 
    .input-group > .form-select.is-valid,
    .input-group > .form-control.is-invalid, 
    .input-group > .form-select.is-invalid {
        border-left: none !important; 
    }
}
