/* ── WorkOrder Checkout CSS ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500&display=swap');

/* ── Section checkout ── */
.wo-checkout-section {
    background: #F5F7FA;
    border: 2px solid #E0F3FA;
    border-radius: 12px;
    padding: 24px 28px;
    margin: 24px 0;
}
.wo-checkout-section h3 {
    font-size: 17px;
    color: #141414;
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Champ de formulaire ── */
.wo-checkout-field {
    margin-bottom: 18px;
}
.wo-checkout-field label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #1f2937;
    margin-bottom: 8px;
}
.wo-required { color: #ef4444; margin-left: 3px; }
.wo-field-hint {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-top: 6px;
}

/* ── Input date (flatpickr) ── */
.wo-datepicker,
.wo-datepicker.input-text {
    width: 100%;
    max-width: 340px;
    background: #fff;
    border: 2px solid #E0F3FA !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    font-size: 15px !important;
    color: #1f2937 !important;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
}
.wo-datepicker:focus {
    border-color: #22c55e !important;
    box-shadow: 0 0 0 3px rgba(34,197,94,.15) !important;
    outline: none;
}

/* Time Select*/

.wo-time-select{
    width: 100%;
    max-width: 340px;
    background: #fff;
    border: 2px solid #E0F3FA !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    font-size: 15px !important;
    color: #1f2937 !important;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
}

/* Overrides Flatpickr */
.flatpickr-calendar {
    border-radius: 12px !important;
    box-shadow: 0 10px 40px rgba(0,0,0,.12) !important;
    border: 1px solid #e5e7eb !important;
    font-family: 'DM Sans', sans-serif !important;
}
.flatpickr-day.selected,
.flatpickr-day.selected:hover {
    background: #22c55e !important;
    border-color: #22c55e !important;
}
.flatpickr-day:hover {
    background: #dcfce7 !important;
    border-color: transparent !important;
    color: #141414 !important;
}
.flatpickr-day.flatpickr-disabled {
    color: #d1d5db !important;
    text-decoration: line-through;
}
.flatpickr-months .flatpickr-month,
.flatpickr-weekdays {
    background: #F5F7FA !important;
}
.flatpickr-current-month { color: #141414 !important; }
.flatpickr-weekday { color: #6b7280 !important; font-weight: 600 !important; }

/* ── Fréquence ── */
.wo-freq-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.wo-freq-option {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 12px 16px;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: border-color .2s, background .2s;
}
.wo-freq-option:hover {
    border-color: #E0F3FA;
    background: #F5F7FA;
}
.wo-freq-option input[type="radio"] {
    accent-color: #2873ff;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.wo-freq-option input[type="radio"]:checked + span {
    font-weight: 600;
    color: #141414;
}
.wo-freq-option:has(input:checked) {
    border-color: #2873ff;
    background: #F5F7FA;
}

/* Number of bin inline */
.wo-bins-options{
    margin-bottom: 15px;
}
.wo-bins-options .wo-bins-option-select{
    width: 100%;
    max-width: 340px;
    background: #fff;
    border: 2px solid #E0F3FA !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    font-size: 15px !important;
    color: #1f2937 !important;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
}
.wo-bins-options-select:focus {
    border-color: #22c55e !important;
    box-shadow: 0 0 0 3px rgba(34,197,94,.15) !important;
    outline: none;
}

/* Preview dates inline */
.wo-freq-preview-inline,
.wo-checkout-dates-preview {
    background: #fff;
    border: 1px solid #E0F3FA;
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 12px;
    font-size: 13px;
    color: #065f46;
}
.wo-checkout-dates-preview ul {
    margin: 8px 0 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.wo-checkout-dates-preview li {
    background: #dcfce7;
    border: 1px solid #E0F3FA;
    border-radius: 6px;
    padding: 4px 12px;
    font-weight: 500;
}

/* ── Info box paiement ── */
.wo-checkout-info-box {
    background: #fff;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    padding: 14px 18px;
    font-size: 14px;
    color: #92400e;
    line-height: 1.6;
    margin-top: 20px;
}
.wo-checkout-info-box strong { color: #78350f; }

/* ── Surcharge du mode COD dans WC ── */
#payment .payment_method_cod label {
    font-weight: 600 !important;
    color: #141414 !important;
}
#payment .payment_method_cod .payment_box {
    background: #F5F7FA !important;
    border-color: #E0F3FA !important;
}

/* ── Page produit ── */
.wo-checkout-field.wo-date-field,
.wo-checkout-field.wo-freq-field,
.wo-checkout-field.wo-bins-field,
.wo-checkout-field.wo-time-field {
    margin-bottom: 20px;
    padding: 18px 20px;
    background: #F5F7FA;
    border: 1px solid #E0F3FA;
    border-radius: 10px;
}

/* ── Page de confirmation (thank you) ── */
.wo-thankyou-box {
    background: #F5F7FA;
    border: 2px solid #E0F3FA;
    border-radius: 12px;
    padding: 24px 28px;
    margin: 24px 0;
}
.wo-thankyou-box h3 { margin: 0 0 14px; color: #141414; font-size: 17px; }
.wo-planned-dates {
    list-style: none;
    padding: 0;
    margin: 12px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.wo-planned-dates li {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #E0F3FA;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 14px;
}
.wo-planned-num {
    background: #22c55e;
    color: #fff;
    border-radius: 50%;
    width: 22px; height: 22px;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.wo-thankyou-payment {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    color: #92400e;
    margin-top: 16px;
}

.woocommerce div.product form.cart .button.single_add_to_cart_button{
    background-color: #2873ff;
    color: #ffffff;
    font-size: 20px;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    border-color: #2873ff;
    transition: 0.3s all;
    &:hover{
        background-color: #ffffff;
        color: #2873ff;
    }
}
    

/* ── Responsive ── */
@media (max-width: 600px) {
    .wo-checkout-section { padding: 16px; }
    .wo-datepicker, .wo-datepicker.input-text { max-width: 100%; }
    .wo-planned-dates { flex-direction: column; }
}

/* ── Résumé checkout (summary card + form d'édition) ─────────────────────── */
.wo-checkout-summary-card {
    background: #fff;
    border: 1.5px solid #E0F3FA;
    border-radius: 10px;
    padding: 18px 22px;
    margin-bottom: 12px;
}
.wo-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f4f8;
    font-size: 14px;
    color: #374151;
}
.wo-summary-row:last-of-type { border-bottom: none; }
.wo-summary-label { color: #6b7280; }
.wo-summary-edit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    background: none;
    border: 1.5px solid #E0F3FA;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 13px;
    color: #2873ff;
    cursor: pointer;
    transition: background .2s, border-color .2s;
}
.wo-summary-edit:hover { background: #F5F7FA; border-color: #2873ff; }

.wo-checkout-edit-form {
    background: #F5F7FA;
    border: 1.5px solid #E0F3FA;
    border-radius: 10px;
    padding: 20px 22px;
    margin-top: 6px;
}
.wo-checkout-edit-form .wo-checkout-field { margin-bottom: 14px; }
.wo-checkout-edit-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 7px;
}
.wo-checkout-edit-form select {
    width: 100%;
    max-width: 340px;
    background: #fff;
    border: 2px solid #E0F3FA;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    color: #1f2937;
    cursor: pointer;
}
.wo-edit-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #e5e7eb;
}
.wo-edit-actions .button.alt {
    background: #2873ff;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s;
}
.wo-edit-actions .button.alt:hover { opacity: .88; }
.wo-edit-actions .button {
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 14px;
    color: #6b7280;
    cursor: pointer;
    transition: border-color .2s;
}
.wo-edit-actions .button:hover { border-color: #94a3b8; color: #374151; }

/* Bouton add-to-cart désactivé */
.single_add_to_cart_button.wo-disabled,
.single_add_to_cart_button[disabled] {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}
