.mts-pdf-listing {
  width: 100%;
}

.mts-pdf-layout {
  display: grid;
  grid-template-columns: 35% 65%;
  gap: 32px;
  width: 100%;
  align-items: start;
}

.mts-pdf-sidebar,
.mts-pdf-content {
  min-width: 0;
}

.mts-pdf-search-wrap {
  margin-bottom: 16px;
}

.mts-pdf-search {
  width: 100%;
  height: 48px;
  border: 1px solid #d8d8d8;
  padding: 0 14px;
  font-size: 16px;
  background: #fff;
}

.mts-pdf-tabs {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mts-pdf-tab {
  width: 100%;
  border: 1px solid #d9d9d9;
  background: #ffffff;
  color: #111111;
  padding: 16px 18px;
  text-align: left;
  font-size: 16px;
  line-height: 1.3;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 0;
}

.mts-pdf-tab:hover,
.mts-pdf-tab.is-active {
  background: #c8102e;
  border-color: #c8102e;
  color: #ffffff;
}

.mts-pdf-panel {
  min-height: 180px;
}

.mts-pdf-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

.mts-pdf-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: #ffffff;
  border: 1px solid #e5e5e5;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.mts-pdf-card-top {
  background: #c8102e;
  padding: 12px 16px;
}

.mts-pdf-card-top p {
  margin: 0;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.mts-pdf-card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 20px;
  background: #ffffff;
}

.mts-pdf-card-body h3 {
  margin: 0 0 12px;
  font-size: 22px;
  line-height: 1.25;
}

.mts-pdf-description {
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.6;
  color: #333333;
}

.mts-pdf-card-actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mts-pdf-preview-button.et_pb_button,
.et_pb_button.mts-pdf-preview-button,
.mts-pdf-download-button.et_pb_button,
.et_pb_button.mts-pdf-download-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  line-height: 1.2;
}

.mts-pdf-download-button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.mts-pdf-empty,
.mts-pdf-loading {
  padding: 20px;
  border: 1px solid #ececec;
  background: #fafafa;
  font-size: 15px;
}

.mts-pdf-card.is-hidden {
  display: none;
}

.mts-pdf-modal[hidden] {
  display: none !important;
}

.mts-pdf-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
}

html.mts-pdf-modal-open,
body.mts-pdf-modal-open {
  overflow: hidden !important;
}

.mts-pdf-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

.mts-pdf-modal-dialog {
  position: relative;
  z-index: 2147483647;
  width: min(1100px, calc(100% - 40px));
  height: min(85vh, 900px);
  margin: 5vh auto 0;
  background: #fff;
  z-index: 2;
  display: flex;
  flex-direction: column;
}

.mts-pdf-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  border: 0;
  width: 40px;
  height: 40px;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  background: #fff;
}

.mts-pdf-modal-header {
  padding: 18px 56px 12px 20px;
  border-bottom: 1px solid #eee;
}

.mts-pdf-modal-title {
  margin: 0;
  font-size: 20px;
}

.mts-pdf-modal-body {
  flex: 1 1 auto;
}

.mts-pdf-modal-frame {
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 980px) {
  .mts-pdf-layout {
    grid-template-columns: 35% 65%;
    gap: 20px;
  }

  .mts-pdf-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }

  .mts-pdf-card-body {
    padding: 16px;
  }

  .mts-pdf-card-body h3 {
    font-size: 20px;
  }
}

@media (max-width: 767px) {
  .mts-pdf-layout {
    grid-template-columns: 1fr;
  }

  .mts-pdf-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mts-pdf-modal-dialog {
    width: calc(100% - 20px);
    height: 88vh;
    margin-top: 4vh;
  }
}




/* Botones nativos Divi, sin iconos adicionales del plugin */
.mts-pdf-card-actions .et_pb_button,
.mts-pdf-card-actions .mts-pdf-preview-button,
.mts-pdf-card-actions .mts-pdf-download-button {
  font-size: 16px;
}

.mts-pdf-card-actions .mts-pdf-preview-button {
  font-size: 14px;
}


/* v2.1.5 - wrappers y botones nativos de Divi */
.mts-pdf-card-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.mts-pdf-card-actions .mts-pdf-button-wrap {
  width: 100%;
  margin: 0;
}

.mts-pdf-card-actions .mts-pdf-button-wrap .et_pb_button {
  display: block;
  width: 100%;
  text-align: center;
}

.mts-pdf-card-actions .mts-pdf-preview-button {
  font-size: 14px !important;
}

.mts-pdf-card-actions .mts-pdf-download-button {
  font-size: 16px !important;
}


#mts-pdf-global-modal,
#mts-pdf-global-modal * {
  box-sizing: border-box;
}
