/* Bouton */
.daw-open-btn {
    display: inline-block;
    cursor: pointer;
}
/* Juste après Ajouter au panier : côte à côte, même gabarit que le bouton du thème */
.daw-pos-after_cart { margin-left: 8px; vertical-align: middle; }
/* À la place exacte d'Ajouter au panier (celui-ci est masqué en CSS) */
.daw-pos-replace_cart { margin: 0; }
.daw-pos-before_cart { display: block; margin-bottom: 10px; }
@media (max-width: 520px) {
    .daw-pos-after_cart { margin-left: 0; margin-top: 8px; display: block; }
}
/* Bouton dans les grilles produit (home, boutique, catégories, produits liés) */
.daw-loop-btn {
    display: inline-block;
    cursor: pointer;
    margin-top: 6px;
    text-decoration: none;
}
.daw-loop-btn.daw-btn-custom {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 6px;
}
a.daw-loop-btn.daw-btn-custom { color: var(--daw-btn-text, #fff); }
.daw-btn-custom {
    background: var(--daw-btn-bg, #0d6efd);
    color: var(--daw-btn-text, #fff);
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    transition: opacity .2s ease;
}
.daw-btn-custom:hover { opacity: .88; color: var(--daw-btn-text, #fff); }

/* Overlay + modal */
.daw-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(17, 24, 39, .55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow-y: auto;
}
.daw-modal {
    position: relative;
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 28px;
    box-sizing: border-box;
}
.daw-modal h3 {
    margin: 0 0 4px;
    font-size: 20px;
    color: #111827;
}
.daw-product-name {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--daw-primary, #0d6efd);
}
.daw-intro { margin: 0 0 18px; font-size: 13px; color: #6b7280; }

.daw-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
}
.daw-close:hover { color: #111827; background: none; }

/* Formulaire */
.daw-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
@media (max-width: 520px) { .daw-grid { grid-template-columns: 1fr; } }

.daw-field { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.daw-field-full { margin-top: 12px; }
.daw-field span { font-size: 12.5px; font-weight: 600; color: #374151; }
.daw-field em { color: #ef4444; font-style: normal; }
.daw-field input,
.daw-field textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 14px;
    background: #fff;
    color: #111827;
}
.daw-field input:focus,
.daw-field textarea:focus {
    outline: none;
    border-color: var(--daw-primary, #0d6efd);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, .12);
}

.daw-hp { position: absolute !important; left: -9999px !important; height: 0; width: 0; opacity: 0; }

/* Multi-produits */
.daw-extras { margin-top: 14px; }
.daw-extras-label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}
.daw-extras-search { position: relative; }
.daw-extras-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 14px;
}
.daw-extras-input:focus {
    outline: none;
    border-color: var(--daw-primary, #0d6efd);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, .12);
}
.daw-extras-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 10;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
    max-height: 220px;
    overflow-y: auto;
}
.daw-extras-results button {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    background: #fff;
    border: none;
    border-bottom: 1px solid #f3f4f6;
    padding: 9px 12px;
    font-size: 13.5px;
    color: #111827;
    text-align: left;
    cursor: pointer;
}
.daw-extras-results button:hover { background: #f9fafb; }
.daw-extras-results button span { color: #6b7280; white-space: nowrap; }
.daw-extras-empty { padding: 10px 12px; font-size: 13px; color: #9ca3af; }

.daw-extras-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 7px 10px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}
.daw-extras-name { flex: 1; font-size: 13.5px; color: #111827; }
.daw-extras-item input[type="number"] {
    width: 64px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 5px 8px;
    font-size: 13.5px;
    text-align: center;
}
.daw-extras-remove {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 6px;
}
.daw-extras-remove:hover { color: #ef4444; background: none; }

.daw-consent {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-top: 14px;
    font-size: 12.5px;
    color: #4b5563;
}
.daw-consent input { margin-top: 2px; }

.daw-error {
    margin: 12px 0 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    font-size: 13px;
}

.daw-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 16px;
    background: var(--daw-primary, #0d6efd);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 13px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s ease;
}
.daw-submit:hover { opacity: .88; color: #fff; }
.daw-submit[disabled] { opacity: .6; cursor: not-allowed; }

.daw-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: daw-spin .7s linear infinite;
}
@keyframes daw-spin { to { transform: rotate(360deg); } }

/* Succès */
.daw-step-success { text-align: center; padding: 12px 0; }
.daw-success-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: #f0fdf4;
    color: #22c55e;
    font-size: 28px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.daw-success-msg { font-size: 14px; color: #4b5563; }

body.daw-modal-open { overflow: hidden; }
