/* Styles de base pour le plugin Sensation Gift Cards */
/* Styles de base pour le plugin Sensation Gift Cards */
/* Container principal : deux colonnes flexibles (options à gauche, aperçu à droite) */
.sgc-form-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    background: #fdfdfd;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

/* Colonne des options */
.sgc-options {
    flex: 1 1 55%;
    max-width: 55%;
}

/* Colonne de prévisualisation */
.sgc-preview-column {
    flex: 1 1 40%;
    max-width: 40%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

/* Prévisualisation : même ratio que la carte finale mais miniature */
/* Prévisualisation : même ratio que la carte finale (environ 2.1:1) mais miniature */
.sgc-preview {
    width: 100%;
    max-width: 350px;
    height: 170px;
    border: 1px solid #ddd;
    border-radius: 8px;
    position: relative;
    background-size: cover;
    background-repeat: no-repeat;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

/* Styles des miniatures de décor et fond */
.sgc-predefined-backgrounds,
.sgc-predefined-images {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sgc-bg-option,
.sgc-img-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.sgc-bg-option input,
.sgc-img-option input {
    margin-bottom: 0.3rem;
}

.sgc-bg-option img {
    width: 120px;
    height: 70px;
    object-fit: cover;
    border: 1px solid #ccc;
    border-radius: 4px;
    transition: box-shadow 0.2s;
}

.sgc-img-option img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 1px solid #ccc;
    border-radius: 4px;
    transition: box-shadow 0.2s;
}

.sgc-bg-option input:checked + img,
.sgc-img-option input:checked + img {
    box-shadow: 0 0 0 3px #c49c74;
    border-color: #c49c74;
}

/* Champs de formulaire */
.sgc-field {
    margin-bottom: 1rem;
}

.sgc-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.sgc-field input[type="text"],
.sgc-field input[type="url"],
.sgc-field select,
.sgc-field textarea {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    color: #333;
    box-sizing: border-box;
}

.sgc-field textarea {
    resize: vertical;
}

/* Bouton principal */
.sgc-button {
    display: inline-block;
    background-color: #c49c74;
    color: #fff;
    border: none;
    padding: 0.7rem 1.5rem;
    cursor: pointer;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.2s;
}

.sgc-button:hover {
    background-color: #a37a53;
}

/* Aperçu : images décoratives et QR code */
.sgc-preview img.preview-img1,
.sgc-preview img.preview-img2,
.sgc-preview img.preview-qr {
    position: absolute;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    border-radius: 4px;
}

/* Positionnement des éléments dans l'aperçu pour correspondre au modèle Canva */
.sgc-preview img.preview-img1 {
    top: 4%;
    right: 4%;
    width: 32%;
    height: 45%;
    border-width: 8px;
    transform: rotate(-4deg);
}

.sgc-preview img.preview-img2 {
    top: 52%;
    right: 4%;
    width: 32%;
    height: 45%;
    border-width: 8px;
    transform: rotate(4deg);
}

.sgc-preview img.preview-qr {
    top: 61%;
    left: 44%;
    width: 20%;
    height: 28%;
    object-fit: contain;
    border: none;
    box-shadow: none;
}

/* Masquer la bordure lorsque aucune image sélectionnée */
.sgc-preview img.preview-img1[src=""],
.sgc-preview img.preview-img2[src=""] {
    display: none;
}

/* Champs URL supplémentaires */
.sgc-url-field {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #555;
}

/* Liste des offres */
.sgc-offer-item {
    background-color: #fafafa;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
