/**
 * Exhibitor manual dashboard – styles partagés (cart, forms-status, badges, etc.)
 * Chargé depuis layouts/app.blade.php après style.css
 */

/* --------------------------------------------------------------------------
   Largeur du bloc « Purchase options » / forms-status (index)
   -------------------------------------------------------------------------- */
.forms-modern {
    width: 100%;
    max-width: calc(100% - 2rem);
    margin-left: auto;
    margin-right: auto;
}

/* Bootstrap Icons n'ont pas de vrai "bold" : on épaissit visuellement le trait */
.exhibitor-icon-thick {
    text-shadow:
        0.4px 0 currentColor,
        -0.4px 0 currentColor,
        0 0.4px currentColor,
        0 -0.4px currentColor;
}

@media (max-width: 991.98px) {
    .forms-modern {
        max-width: 100%;
    }
}

/* --------------------------------------------------------------------------
   Forms & documents – accordion (forms-status.blade.php)
   -------------------------------------------------------------------------- */
.forms-modern .accordion-item {
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius-lg);
    overflow: hidden;
    margin-bottom: 0.9rem;
    background: var(--bs-body-bg);
    box-shadow: var(--bs-box-shadow-sm);
}

.forms-modern .accordion-item:last-child {
    margin-bottom: 0;
}

.forms-modern .accordion-button {
    padding: 0.9rem 1rem;
    font-weight: 600;
    background: var(--bs-tertiary-bg);
}

.forms-modern .accordion-button:not(.collapsed) {
    background: var(--bs-light-bg-subtle);
    box-shadow: none;
}

.forms-modern .accordion-button i {
    margin-right: 0.5rem;
}

.forms-modern .accordion-body {
    padding: 1rem 1rem 1.25rem;
    font-size: 0.98rem;
    line-height: 1.5;
}

.forms-modern .accordion-body small,
.forms-modern .accordion-body .small {
    font-size: 0.9rem !important;
}

.forms-modern .accordion-body .table,
.forms-modern .accordion-body .table-sm {
    font-size: 0.96rem;
}

.forms-modern .accordion-body .table thead th {
    font-size: 0.93rem;
    font-weight: 600;
}

.forms-modern .accordion-body .badge {
    font-size: 0.9rem;
}

.forms-modern .badge.bg-warning,
.forms-modern .badge.bg-info,
.forms-modern .badge.bg-light {
    color: var(--bs-dark) !important;
}

.forms-modern .badge.bg-success,
.forms-modern .badge.bg-danger,
.forms-modern .badge.bg-primary,
.forms-modern .badge.bg-secondary {
    color: var(--bs-white, #fff) !important;
}

/* Forms-status: convertir tous les badges bg-* en badges "outline" */
.forms-modern .badge[class*="bg-"] {
    background-color: #fff !important;
    border: 1px solid currentColor;
}

.forms-modern .badge.bg-primary {
    color: var(--bs-primary) !important;
}

.forms-modern .badge.bg-success {
    color: var(--bs-success) !important;
}

.forms-modern .badge.bg-danger {
    color: var(--bs-danger) !important;
}

.forms-modern .badge.bg-warning {
    color: var(--bs-warning-text-emphasis, #997404) !important;
}

.forms-modern .badge.bg-info {
    color: var(--bs-info-text-emphasis, #055160) !important;
}

.forms-modern .badge.bg-secondary {
    color: var(--bs-secondary) !important;
}

.forms-modern .badge.bg-light {
    color: var(--bs-gray-700) !important;
}

.forms-modern .accordion-body .text-muted {
    font-size: 0.95rem;
}

.forms-modern .badge {
    border-radius: 999px;
    padding-inline: 0.65rem;
}

/* Badges "custom" outline (fond blanc + bordure colorée) */
.forms-modern .badge.badge-outline {
    background-color: #fff !important;
    border: 1px solid currentColor;
    border-radius: 999px;
}

.forms-modern .badge.badge-outline-info {
    color: var(--bs-info-text-emphasis, var(--bs-info)) !important;
}

.forms-modern .badge.badge-outline-success {
    color: var(--bs-success) !important;
}

.forms-modern .badge.badge-outline-secondary {
    color: var(--bs-secondary) !important;
}

.forms-modern .btn {
    border-radius: 999px;
    padding-inline: 1rem;
}

/* Bouton outline primary harmonisé avec le thème Exhibitor Manual */
.exhibitor-manual .btn-outline-primary,
.forms-modern .btn-outline-primary {
    border-color: #cd1f45 !important;
    color: #cd1f45 !important;
    background-color: #fff !important;
}

.exhibitor-manual .btn-outline-primary:hover,
.exhibitor-manual .btn-outline-primary:focus,
.exhibitor-manual .btn-outline-primary:active,
.exhibitor-manual .btn-outline-primary.active,
.forms-modern .btn-outline-primary:hover,
.forms-modern .btn-outline-primary:focus,
.forms-modern .btn-outline-primary:active,
.forms-modern .btn-outline-primary.active {
    border-color: #cd1f45 !important;
    background-color: #cd1f45 !important;
    color: #fff !important;
}

.exhibitor-manual .btn-outline-primary:focus-visible,
.forms-modern .btn-outline-primary:focus-visible {
    box-shadow: 0 0 0 0.2rem rgba(205, 31, 69, 0.25) !important;
}

.forms-modern .table thead th {
    white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Cart summary (cart-footer.blade.php)
   Ne pas forcer position:static !important ici : ça empêche position:sticky sur la page badges
   (même avec une règle plus spécifique, certains navigateurs / l’ordre des !important posaient problème).
   -------------------------------------------------------------------------- */
#cart-sidebar {
    width: 100%;
    transform: none;
}

#cart-items .cart-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.625rem 0.35rem;
    border-bottom: 1px solid var(--bs-border-color-translucent, var(--bs-border-color));
}

#cart-items .cart-item:last-child {
    border-bottom: 0;
    padding-bottom: 0.25rem;
}

#cart-items .cart-item-details {
    flex: 1;
    min-width: 0;
}

#cart-items .cart-item-remove {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    margin-top: 0.125rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 50%;
    background-color: var(--bs-body-bg);
    color: var(--bs-danger);
    line-height: 1;
    cursor: pointer;
    transition:
        color 0.15s ease,
        background-color 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.12s ease;
}

#cart-items .cart-item-remove:hover {
    background-color: var(--bs-danger-bg-subtle, rgba(var(--bs-danger-rgb, 220, 53, 69), 0.1));
    border-color: var(--bs-danger);
    color: var(--bs-danger);
    transform: scale(1.06);
    box-shadow: 0 0.125rem 0.35rem rgba(var(--bs-danger-rgb, 220, 53, 69), 0.2);
}

#cart-items .cart-item-remove:active {
    transform: scale(0.98);
}

#cart-items .cart-item-remove:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-danger-rgb, 220, 53, 69), 0.35);
}

#cart-items .cart-item-remove i {
    font-size: 1rem;
    line-height: 1;
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   Partners – ligne en édition (partners.blade.php)
   -------------------------------------------------------------------------- */
.partner-row.editing {
    background-color: var(--bs-warning-bg-subtle) !important;
    border-left: 4px solid var(--bs-warning);
}

.partner-row.editing input {
    border: 1px solid var(--bs-warning);
    background-color: var(--bs-body-bg);
}

.partner-row.editing input:focus {
    border-color: var(--bs-warning);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-warning-rgb, 255, 193, 7), 0.25);
}

/* --------------------------------------------------------------------------
   Partners card (extra/partners.blade.php)
   -------------------------------------------------------------------------- */
.exhibitor-manual-partners .table thead th {
    white-space: nowrap;
    font-size: 0.82rem;
    font-weight: 600;
}

/* Boutons carrés à coins arrondis (cohérent avec le reste du dashboard, pas en pill) */
.exhibitor-manual-partners .btn.rounded-3 {
    border-radius: var(--bs-border-radius-lg) !important;
}

/* Modales delegates : reprendre le design boutons global (style.css) */
.exhibitor-manual-partners .btn.btn-primary {
    background-color: #3469b3 !important;
    border-color: #cd1f45 !important;
    border-radius: 50px !important;
    color: #fff !important;
    transition: all 0.5s !important;
    padding: 0.3rem 1.8rem !important;
    font-weight: 600;
}

.exhibitor-manual-partners .modal-footer .btn.btn-primary:hover {
    background-color: #cd1f45 !important;
    border-color: #cd1f45 !important;
    border-radius: 400px !important;
    color: #fff !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2) !important;
}

.exhibitor-manual-partners .modal-footer .btn.btn-secondary {
    background-color: #3469b3 !important;
    border-color: #cd1f45 !important;
    border-radius: 50px !important;
    color: #fff !important;
    transition: all 0.5s !important;
    padding: 0.3rem 1.8rem !important;
    font-weight: 600;
}

.exhibitor-manual-partners .modal-footer .btn.btn-secondary:hover {
    background-color: #cd1f45 !important;
    border-color: #cd1f45 !important;
    color: #fff !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2) !important;
}

/* Tableaux badges / délégués : cadre arrondi sur le <table> (pas de conteneur dédié hors .table-responsive) */
.exhibitor-manual--badges .exhibitor-manual-table-rounded,
.exhibitor-manual-partners .exhibitor-manual-table-rounded {
    margin-bottom: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border: 1px solid var(--bs-border-color) !important;
    border-radius: var(--bs-border-radius-lg) !important;
    overflow: hidden;
}

/* Pas de double filet sur le pourtour (bordure portée par le tableau) */
.exhibitor-manual--badges .exhibitor-manual-table-rounded thead tr:first-child > *,
.exhibitor-manual-partners .exhibitor-manual-table-rounded thead tr:first-child > * {
    border-top-width: 0 !important;
}

.exhibitor-manual--badges .exhibitor-manual-table-rounded tbody tr:last-child > *,
.exhibitor-manual-partners .exhibitor-manual-table-rounded tbody tr:last-child > * {
    border-bottom-width: 0 !important;
}

.exhibitor-manual--badges .exhibitor-manual-table-rounded thead tr > *:first-child,
.exhibitor-manual--badges .exhibitor-manual-table-rounded tbody tr > *:first-child,
.exhibitor-manual-partners .exhibitor-manual-table-rounded thead tr > *:first-child,
.exhibitor-manual-partners .exhibitor-manual-table-rounded tbody tr > *:first-child {
    border-left-width: 0 !important;
}

.exhibitor-manual--badges .exhibitor-manual-table-rounded thead tr > *:last-child,
.exhibitor-manual--badges .exhibitor-manual-table-rounded tbody tr > *:last-child,
.exhibitor-manual-partners .exhibitor-manual-table-rounded thead tr > *:last-child,
.exhibitor-manual-partners .exhibitor-manual-table-rounded tbody tr > *:last-child {
    border-right-width: 0 !important;
}

/* --------------------------------------------------------------------------
   Page Badges uniquement (évite d’impacter toutes les .row du site)
   -------------------------------------------------------------------------- */

/* Contour 1px sur les cartes : bordure réelle (l’inset box-shadow passe SOUS le contenu et disparaît). */
.exhibitor-manual--badges .card:not(.partner-type-card) {
    border: 1px solid var(--bs-border-color) !important;
    border-radius: var(--bs-border-radius-xl) !important;
    box-shadow: var(--bs-box-shadow-sm) !important;
}

.exhibitor-manual--badges .partner-type-card {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.exhibitor-manual--badges .partner-type-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--bs-box-shadow);
}

.exhibitor-manual--badges .partner-type-card.border-primary {
    border-color: var(--bs-primary) !important;
    background-color: var(--bs-light);
}

.exhibitor-manual--badges .partner-type-description {
    margin-left: 1.5rem;
    color: var(--bs-secondary);
}

/* Badges Bootstrap : même lisibilité / forme « pill » que forms-status (.forms-modern) */
.exhibitor-manual--badges .badge {
    font-size: 0.9rem;
    border-radius: 999px;
    padding-inline: 0.65rem;
}

.exhibitor-manual--badges .badge.bg-warning,
.exhibitor-manual--badges .badge.bg-info,
.exhibitor-manual--badges .badge.bg-light {
    color: var(--bs-dark) !important;
}

.exhibitor-manual--badges .badge.bg-success,
.exhibitor-manual--badges .badge.bg-danger,
.exhibitor-manual--badges .badge.bg-primary,
.exhibitor-manual--badges .badge.bg-secondary {
    color: var(--bs-white, #fff) !important;
}

/* Pages manual/forms: badges bg-* en version outline */
.exhibitor-manual--badges .badge[class*="bg-"] {
    background-color: #fff !important;
    border: 1px solid currentColor;
}

.exhibitor-manual--badges .badge.bg-primary {
    color: var(--bs-primary) !important;
}

.exhibitor-manual--badges .badge.bg-success {
    color: var(--bs-success) !important;
}

.exhibitor-manual--badges .badge.bg-danger {
    color: var(--bs-danger) !important;
}

.exhibitor-manual--badges .badge.bg-warning {
    color: var(--bs-warning-text-emphasis, #997404) !important;
}

.exhibitor-manual--badges .badge.bg-info {
    color: var(--bs-info-text-emphasis, #055160) !important;
}

.exhibitor-manual--badges .badge.bg-secondary {
    color: var(--bs-secondary) !important;
}

.exhibitor-manual--badges .badge.bg-light {
    color: var(--bs-gray-700) !important;
}

.exhibitor-manual--badges .table .badge {
    font-size: 0.9rem;
}

/* HCP summary : nom plus compact pour alléger la première colonne */
.exhibitor-manual--badges .hcp-badge-name-col {
    font-size: 0.92rem;
}

.exhibitor-manual--badges .hcp-badge-name {
    font-size: 0.95rem;
    font-weight: 600;
}

.exhibitor-manual--badges .gap-2 {
    gap: 0.5rem !important;
}

.exhibitor-manual--badges .card-header .badge {
    font-weight: 500;
}

.exhibitor-manual--badges .form-text {
    font-size: 0.875em;
}

.exhibitor-manual--badges .badge-form {
    margin: 0;
}

.exhibitor-manual--badges .badge-form input {
    border: 1px solid var(--bs-success);
}

.exhibitor-manual--badges .badge-form input:focus {
    border-color: var(--bs-success);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-success-rgb, 25, 135, 84), 0.25);
}

.exhibitor-manual--badges .free-places-input {
    border: 1px solid var(--bs-info) !important;
    background-color: var(--bs-light);
}

.exhibitor-manual--badges .free-places-input:focus {
    border-color: var(--bs-info) !important;
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-info-rgb, 13, 202, 240), 0.25) !important;
}

.exhibitor-manual--badges .free-places-input:disabled {
    background-color: var(--bs-secondary-bg);
    opacity: 0.6;
}

.exhibitor-manual--badges .cart-item-free {
    color: var(--bs-success);
    font-size: 0.9em;
    margin-top: 0.25rem;
}

.exhibitor-manual--badges .cart-item-free i {
    margin-right: 0.5rem;
}

.exhibitor-manual--badges .cart-item-price {
    margin-bottom: 0.25rem;
}

.exhibitor-manual--badges .assignment-form {
    background-color: var(--bs-light);
    border-radius: 0.375rem;
    padding: 1rem;
}

.exhibitor-manual--badges .assignment-form select {
    border: 1px solid var(--bs-success);
}

.exhibitor-manual--badges .assignment-form select:focus {
    border-color: var(--bs-success);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-success-rgb, 25, 135, 84), 0.25);
}

.exhibitor-manual--badges .col-lg-8 .card {
    height: fit-content;
}

@media (min-width: 992px) {
    .exhibitor-manual--badges .row {
        display: flex !important;
        flex-wrap: nowrap !important;
    }

    .exhibitor-manual--badges .col-lg-8 {
        flex: 0 0 66.666667% !important;
        max-width: 66.666667% !important;
    }

    .exhibitor-manual--badges .col-lg-4 {
        flex: 0 0 33.333333% !important;
        max-width: 33.333333% !important;
    }

    .exhibitor-manual--badges .col-xl-9 {
        flex: 0 0 75% !important;
        max-width: 75% !important;
    }

    .exhibitor-manual--badges .col-xl-3 {
        flex: 0 0 25% !important;
        max-width: 25% !important;
    }
}

.exhibitor-manual--badges .container-fluid {
    max-width: 100vw;
    overflow-x: visible;
}

.exhibitor-manual--badges .row {
    margin-left: 0;
    margin-right: 0;
}

.exhibitor-manual--badges .col-lg-8,
.exhibitor-manual--badges .col-lg-4,
.exhibitor-manual--badges .col-xl-9,
.exhibitor-manual--badges .col-xl-3 {
    padding-left: 10px;
    padding-right: 10px;
}

/* Panier sticky : la colonne doit avoir la hauteur de la colonne principale (align-items-start la réduisait au seul panier → sticky inactif) */
@media (min-width: 992px) {
    .exhibitor-manual--badges .row.align-items-start > .cart-sidebar-col {
        align-self: stretch !important;
        display: flex;
        flex-direction: column;
    }

    /* overflow-hidden sur la carte casse souvent sticky sur l’élément lui-même ; coins gérés par rounded-4 + ombre */
    .exhibitor-manual--badges .cart-sidebar-col #cart-sidebar.cart-sidebar {
        position: sticky !important;
        top: 160px !important;
        z-index: 2;
        flex-shrink: 0;
        overflow: visible !important;
    }
}

@media (max-width: 991.98px) {
    .exhibitor-manual--badges .cart-sidebar-col #cart-sidebar {
        position: static !important;
        top: auto !important;
        z-index: auto;
    }
}
