<turbo-stream action="update" target="remote_modal_sec"><template><turbo-frame id="remote_modal_sec">
  <div class="modal fade" id="material-modal" tabindex="-1" data-controller="modal" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered modal-lg mx-auto">
      <div class="modal-content border-0 shadow-lg rounded-4 overflow-hidden">

        <div class="modal-header border-0 p-4 text-white" style="background: linear-gradient(135deg, #6610f2 0%, #0d6efd 100%);">
          <div class="d-flex align-items-center w-100">
            <div class="bg-white bg-opacity-20 p-3 rounded-circle me-3 shadow-sm">
              <i class='bx bx-library fs-2 text-primary'></i>
            </div>
            <div class="flex-grow-1">
              <h4 class="modal-title fw-bold mb-0 text-white">Material de Estudio</h4>
              <p class="small mb-0 text-white-50">1 material disponible</p>
            </div>
            <button type="button" class="btn-close btn-close-white ms-auto" data-bs-dismiss="modal" aria-label="Close"></button>
          </div>
        </div>

        <div class="modal-body p-3 p-md-4 bg-light bg-opacity-50">
            <div class="row g-3">

                <div class="col-12">
                  <div class="card border-0 shadow-sm rounded-4 hover-translate-y transition-all">
                    <div class="card-body p-3">
                      <div class="d-flex align-items-center w-100">

  <div class="flex-shrink-0 bg-white shadow-sm p-2 rounded-4 me-3 d-flex align-items-center justify-content-center"
       style="width: 60px; height: 60px; border: 1px solid #f0f0f0;">
    <i class="bx bxs-file-pdf fs-1 text-danger" title="PDF"></i>
  </div>

                        <div class="flex-grow-1 min-w-0">
                          <h6 class="text-dark fw-bold mb-1 lh-base text-wrap" style="word-break: break-word;">
                            Evaluación de Inversiones
                          </h6>
                          <div class="d-flex align-items-center">
                            <div class="type-label-wrapper" style="transform: scale(0.85); transform-origin: left center;">
                              <span class="label bg-light-blue color-palette">Lectura Teórica</span>
                            </div>
                          </div>
                        </div>

                        <div class="flex-shrink-0 ms-3">
                            <a target="_blank" class="btn btn-outline-danger rounded-circle d-flex align-items-center justify-content-center shadow-sm" style="width: 42px; height: 42px;" href="/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6NTA5LCJwdXIiOiJibG9iX2lkIn19--6a83a63ca7db0cbd7600851b103274f61b6fa2a1/EVALUACION%20DE%20INVERSIONES.pdf?disposition=attachment">
                              <i class='bx bx-download fs-4'></i>
</a>                        </div>

                      </div>
                    </div>
                  </div>
                </div>
            </div>
        </div>

        <div class="modal-footer border-0 p-3 bg-white text-center d-block">
          <button type="button" class="btn btn-light rounded-pill px-5 fw-bold border" data-bs-dismiss="modal">Cerrar</button>
        </div>
      </div>
    </div>
  </div>

  <style>
    #remote_modal_sec { display: block; width: 100%; }
    .text-wrap { white-space: normal !important; overflow: visible !important; }
    /* Ajuste para que tus labels de colores se vean bien como píldoras */
    .type-label-wrapper .label {
      padding: 2px 10px; font-size: 0.65rem; border-radius: 50px;
      font-weight: 700; text-transform: uppercase; display: inline-block;
    }
    .hover-translate-y:hover { transform: translateY(-3px); }
    .transition-all { transition: all 0.2s ease-in-out; }
  </style>
</turbo-frame></template></turbo-stream>