/**
 * 2007-2025 PrestaShop
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to http://www.prestashop.com for more information.
 *
 * @author    PrestaShop SA <contact@prestashop.com>
 * @copyright 2007-2025 PrestaShop SA
 * @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 *  International Registered Trademark & Property of PrestaShop SA


#prestasync-order-invoice-box-link {
    text-align: center;
}

#prestasync-order-invoice-box-link.--no-invoice {
    display: none;
}


*/

/* Wrapper global */
.ks-invoices {
    margin-top: 0.5rem;
}

/* Groupe (commande / autres factures) */
.ks-invoice-group {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #f1f1f1;
    overflow: hidden;
}

/* Header du groupe */
.ks-invoice-group-header {
    padding: 0.9rem 1.2rem;
    background: #fafafa;
    border-bottom: 1px solid #f1f1f1;
}

.ks-invoice-group-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.ks-invoice-group-meta {
    font-size: 0.8rem;
    color: #999;
    margin-top: 0.15rem;
}

.ks-invoice-group-meta i {
    margin-right: 0.3rem;
}

.ks-invoice-group-total {
    font-size: 0.9rem;
    font-weight: 500;
}

.ks-invoice-group-total span {
    margin-left: 0.3rem;
}

/* Body du groupe */
.ks-invoice-group-body {
    padding: 1rem 1rem 0.7rem;
}

/* Card facture */
.ks-invoice-card {
    border-radius: 10px;
    background: #fff;
    border: 1px solid #f3f3f3;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.ks-invoice-card-body {
    padding: 0.9rem 1rem 1rem;
}

.ks-invoice-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.04);
    border-color: #eee;
}

/* Référence facture */
.ks-invoice-ref {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Badges type de facture */
.ks-invoice-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 500;
    white-space: nowrap;
}

.ks-invoice-badge--standard {
    background: rgba(0, 0, 0, 0.05);
    color: #444;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.ks-invoice-badge--deposit {
    background: rgba(251, 176, 53, 0.15); /* Jaune #FBB035 très léger */
    color: #FBB035;                      /* Texte jaune pur */
    border: 1px solid rgba(251, 176, 53, 0.35);
}


.ks-invoice-badge--balance {
    background: rgba(34, 197, 94, 0.10); /* vert léger */
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.25);
}

/* Date */
.ks-invoice-date i {
    margin-right: 0.3rem;
}

/* Montant */
.ks-invoice-amount {
    font-size: 1.25rem;
    font-weight: 700;
}

/* Bouton PDF (brand Kitsuneya) */
.ks-invoice-btn {
    border-radius: 999px;
    border: 1px solid #f20c0e;
    color: #f20c0e;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.4rem 0.75rem;
    background: transparent;
}

.ks-invoice-btn i {
    margin-right: 0.25rem;
}

.ks-invoice-btn:hover {
    background: #f20c0e;
    color: #fff;
    border-color: #f20c0e;
}

/* Responsive : resserrer sur mobile */
@media (max-width: 767.98px) {
    .ks-invoice-group-header {
        padding: 0.8rem 0.9rem;
    }

    .ks-invoice-group-body {
        padding: 0.8rem 0.8rem 0.5rem;
    }

    .ks-invoice-card-body {
        padding: 0.8rem 0.85rem 0.9rem;
    }
}

/* ============ Version compacte (page détail commande) ============ */

#prestasync-order-invoice-box-link {
    text-align: left;
}

#prestasync-order-invoice-box-link.--no-invoice {
    display: none;
}

/* On réutilise les mêmes cards, mais on les compacte via un modificateur */
.ks-invoice-card--compact .ks-invoice-card-body {
    padding: 0.6rem 0.75rem;
}

.ks-invoice-card--compact .ks-invoice-ref {
    font-size: 0.8rem;
}

.ks-invoice-card--compact .ks-invoice-badge {
    font-size: 0.65rem;
    padding: 0.1rem 0.5rem;
}

.ks-invoice-card--compact .ks-invoice-date {
    font-size: 0.7rem;
}

.ks-invoice-card--compact .ks-invoice-amount {
    font-size: 1rem;
}

/* Bouton PDF plus discret mais même style */
.ks-invoice-btn--compact {
    font-size: 0.75rem !important;
    padding: 0.25rem 0.7rem !important;
}

.ks-invoice-btn--compact i {
    margin-right: 0.2rem !important;
}

/* Sur mobile on garde une seule card par ligne */
@media (max-width: 767.98px) {
    .ks-invoice-card--compact .ks-invoice-card-body {
        padding: 0.55rem 0.7rem !important;
    }
}



