/* ============================================================
   Modal Campanha do Competidor
   Design system: #001D6E (navy) | #0054A6 (blue) | #ffcc00 (gold)
============================================================ */

#modalCampanha .modal-content {
    border: none;
    overflow: hidden;
}

/* Header */
#modalCampanha .modal-header {
    background: linear-gradient(135deg, #001D6E 0%, #0054A6 100%);
    border-bottom: none;
    padding: 16px 48px 16px 20px;
    position: relative;
}

#modalCampanha .modal-title {
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.3;
    word-break: break-word;
}

#modalCampanha .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.85;
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
}

/* Body */
#modalCampanha .modal-body {
    padding: 20px;
    background: #fff;
    overflow-y: auto;
    max-height: 60vh;
    -webkit-overflow-scrolling: touch;
}

/* Footer */
#modalCampanha .modal-footer {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 12px 20px;
}

#modalCampanha .modal-footer .btn-campanha-fechar {
    width: 100%;
}

#modalCampanha .btn-campanha-fechar {
    background: #001D6E;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
    padding: 8px 24px;
}

#modalCampanha .btn-campanha-fechar:hover,
#modalCampanha .btn-campanha-fechar:focus {
    background: #0054A6;
    color: #fff;
}


/* Spinner de carregamento */
.modal-campanha-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
}

/* ============================================================
   Desktop (≥768px): dialog centralizado, largura máxima
============================================================ */
@media (min-width: 768px) {
    #modalCampanha .modal-dialog {
        max-width: 640px;
    }

    #modalCampanha .modal-content {
        border-radius: 16px;
        box-shadow: 0 24px 64px rgba(0, 29, 110, 0.25);
    }
}

/* ============================================================
   Mobile & Tablet (<768px): bottom sheet nativo
============================================================ */
@media (max-width: 767px) {
    #modalCampanha .modal-dialog {
        margin: 0 !important;
        max-width: 100% !important;
        width: 100%;
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
    }

    #modalCampanha .modal-content {
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -8px 32px rgba(0, 29, 110, 0.20);
    }

    /* Drag handle visual */
    #modalCampanha .modal-header::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 36px;
        height: 4px;
        border-radius: 2px;
        background: rgba(255, 255, 255, 0.35);
    }

    #modalCampanha .modal-header {
        padding: 20px 44px 14px 16px;
    }

    #modalCampanha .modal-title {
        font-size: 0.85rem;
    }

    #modalCampanha .modal-body {
        padding: 14px;
        max-height: 65vh;
    }

    /* Animação slide-up (substitui o fade padrão do Bootstrap) */
    #modalCampanha.fade .modal-dialog {
        transform: translateY(100%) !important;
        transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1) !important;
    }

    #modalCampanha.show .modal-dialog {
        transform: translateY(0) !important;
    }
}
