/**
 * ImgConseil WTP — Styles modale + bouton "Personnaliser"
 * Inclus uniquement sur les fiches produit qui ont un template WTP configuré.
 */

/* ─── Bouton "Personnaliser mon Poster" sur la fiche produit ─────────── */
.wtp-customize-btn {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff !important;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    margin-bottom: 12px;
}
.wtp-customize-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(231, 76, 60, 0.35);
}
.wtp-customize-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Après ajout au panier : on cache le bouton "Personnaliser" du haut */
body.wtp-added-to-cart .wtp-customize-btn,
body.wtp-added-to-cart #wtp-customize-btn {
    display: none !important;
}

/* ─── Bouton "🔄 Réinitialiser le poster" (sous le form Woo) ─────────── */
.wtp-reset-btn {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 12px 18px;
    background: #f1c40f;
    color: #333;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
}
.wtp-reset-btn:hover {
    background: #f39c12;
}

/* ─── Modale plein écran ─────────────────────────────────────────────── */
#wtp-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    display: flex;
    align-items: stretch;
    justify-content: center;
    overflow: hidden;
}
#wtp-modal-inner {
    background: #f5f5f5;
    width: 100%;
    max-width: 1280px;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}
#wtp-modal-header {
    flex: 0 0 auto;
    padding: 14px 20px;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
#wtp-modal-title {
    font-size: 16px;
    font-weight: 700;
    color: #222;
}
#wtp-modal-close {
    background: transparent;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    padding: 4px 12px;
    border-radius: 6px;
}
#wtp-modal-close:hover {
    background: #f0f0f0;
    color: #e74c3c;
}
#wtp-modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0;
}
#wtp-template-container {
    width: 100%;
    min-height: 100%;
}

/* ─── Mobile : modale plein écran sans débordement horizontal ────────── */
@media (max-width: 768px) {
    #wtp-modal-inner {
        max-width: 100%;
        border-radius: 0;
    }
    #wtp-modal-header {
        padding: 10px 14px;
    }
    #wtp-modal-title {
        font-size: 15px;
    }
    .wtp-customize-btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 16px;
    }
}
