/* ============================================ */
/* FORMULAIRE CARTE CADEAU */
/* ============================================ */
.giftcard-container {
    max-width: 600px;
    margin: 50px auto;
    padding: 25px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    font-family: 'Highway Gothic Narrow', sans-serif;
    font-size: 18px;
}

.giftcard-container h1 {
    text-align: center;
}

.giftcard-container .form-group {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.giftcard-container label {
    margin-bottom: 5px;
    font-weight: bold;
}

.giftcard-container input[type="text"],
.giftcard-container input[type="number"],
.giftcard-container input[type="email"],
.giftcard-container select,
.giftcard-container textarea {
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
    width: 100%;
    box-sizing: border-box;
    height: 40px;
    font-family: inherit;
    font-size: inherit;
}

.giftcard-container textarea {
    resize: vertical;
    height: auto;
}

.giftcard-container select {
    height: 40px;
}

.giftcard-container button {
    background: #007BFF;
    color: #fff;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    font-family: inherit;
    font-size: inherit;
}

.giftcard-container button:hover {
    background: #0056b3;
}

.giftcard-container .giftcard-success {
    background: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-weight: bold;
    font-family: inherit;
    font-size: inherit;
}

.giftcard-container .giftcard-errors {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-family: inherit;
    font-size: inherit;
}

/* CGV */
.giftcard-container .cgv-group {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.giftcard-container .cgv-group input[type="checkbox"] {
    flex-shrink: 0;
    margin: 0;
}

.giftcard-container .cgv-group label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    line-height: 1.4;
    font-family: inherit;
    font-size: inherit;
}

.giftcard-container .cgv-group label a {
    white-space: nowrap;
}

/* Message avec police par défaut du site */
.giftcard-container .default-font {
    font-family: initial;
    font-size: initial;
}

/* Responsive formulaire */
@media(max-width: 500px) {
    .giftcard-container {
        padding: 15px;
    }
}

.giftcard-wrapper {
    display: flex;
    gap: 25px;
    align-items: stretch; /* image suit la hauteur du texte */
}

.giftcard-image {
    flex: 0 0 auto;
    display: flex;
}

.giftcard-image img {
    width: auto;
    height: 100%;           /* prend la hauteur du texte */
    max-height: 270px;       /* jamais plus de 270px */
    object-fit: contain;     /* garde le ratio */
    border-radius: 8px;
}

.giftcard-text {
    text-align: justify;
    flex: 1;                 /* prend le reste de l’espace */
}

/* Responsive mobile */
@media (max-width: 768px) {
    .giftcard-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .giftcard-image img {
        height: auto;
        width: 100%;
        max-width: 300px;
        max-height: none; /* on enlève la limite en mobile */
    }
}


/* ============================================ */
/* LISTING CARTE CADEAU */
/* ============================================ */
.giftcard-listing-container {
    width: 100%;
    margin: 30px auto;
    overflow-x: auto;
}

.giftcard-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Highway Gothic Narrow', sans-serif;
    font-size: 16px;
}

.giftcard-table th,
.giftcard-table td {
    border: 1px solid #ccc;
    padding: 8px 12px;
    white-space: nowrap;
    text-align: center;
}

.giftcard-table th {
    background-color: #f0f0f0;
}

/* STATUTS sur le TD directement */
.giftcard-table td.status-active {
    color: #28a745; /* vert */
    font-weight: bold;
}

.giftcard-table td.status-inactive {
    color: #fd7e14; /* orange */
    font-weight: bold;
}

.giftcard-table td.status-expired {
    color: #dc3545; /* rouge */
    font-weight: bold;
}

.giftcard-table td.status-used {
    color: #007bff; /* bleu */
    font-weight: bold;
}

/* BOUTON ACTIVER */
.giftcard-table .activate-btn {
    padding: 5px 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    background-color: #28a745; /* vert */
    color: #fff;
}

.giftcard-table .activate-btn:hover {
    opacity: 0.85;
}

/* BOUTON DESACTIVER */
.giftcard-table .deactivate-btn {
    padding: 5px 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    background-color: #dc3545; /* rouge */
    color: #fff;
}

.giftcard-table .deactivate-btn:hover {
    opacity: 0.85;
}

.giftcard-table td[colspan] {
    font-style: italic;
    background: #fafafa;
}

.giftcard-block {
    margin-left: 25px;
}

/* Responsive listing */
@media(max-width: 600px) {
    .giftcard-table th,
    .giftcard-table td {
        font-size: 14px;
        padding: 6px 8px;
    }
}
