/* ===============================
   GENERAL
=================================*/

.container {
  padding: 40px;
  text-align: center;
}

.open-btn {
  padding: 10px 20px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

body.modal-open {
  overflow: hidden;
}

/* ===============================
   OVERLAY (AMBOS MODALES)
=================================*/

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal.hidden {
  display: none;
}

/* ===============================
   MODAL EXPLORER (ARCHIVOS)
=================================*/

#modal .modal-box {
  width: 900px;
  height: 600px;
  background: white;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Explorer */

.explorer-header {
  height: 50px;
  background: #ffffff;
  display: flex;
  align-items: center;
  padding: 0 15px;
  border-bottom: 1px solid #ddd;
  justify-content: space-between;
}

.path-display {
  flex: 1;
  text-align: center;
  font-weight: 500;
  color: var(--primary);
}

.nav-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
}

.folders-grid {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  overflow-y: auto;

  align-content: flex-start;
  align-items: flex-start;
}

.folder-item {
  width: 100px;
  text-align: center;
  cursor: pointer;
  padding: 10px;
  border-radius: 8px;

  flex: 0 0 auto;
}

.folder-item:hover {
  background: #e8f0fe;
}

.folder-item.selected {
  background: #d2e3fc;
}

.folder-icon {
  font-size: 60px;
  color: var(--primary);
}

.folder-name {
  margin-top: 5px;
  font-size: 14px;
  word-break: break-word;
  color: var(--primary);
}

.bottom-bar {
  height: 60px;
  background: white;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0 20px;
  border-top: 1px solid #ddd;
}

#select-btn {
  padding: 8px 18px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

#select-btn:disabled {
  background: #aaa;
  cursor: not-allowed;
}

/* ===============================
   MODAL GIF
=================================*/

#gif-modal .modal-box {
  width: 700px;
  max-width: 90vw;

  background: white;
  border-radius: 12px;

  display: flex;
  flex-direction: column;

  padding: 20px;
  position: relative;

  max-height: 90vh;
}

#gif-preview-img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 10px;
  margin: auto;
}

.gif-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;

  width: 40px;
  height: 40px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: transparent;
  border: none;
  border-radius: 50%;

  color: #0a1452;
  font-size: 24px;
  cursor: pointer;

  transition: background 0.2s ease;
}

.gif-close-btn:hover {
  background: rgba(0,0,0,0.05);
}

/* ===============================
   TABLAS Y UI
=================================*/

.eye-btn {
  cursor: pointer;
  font-size: 22px;
  color: #0b1654;
}

.title {
  text-align: center;
  color: #0a1358 !important;
}

.filter-card {
  margin-bottom: 12px;
  position: relative;
  width: 100%;
  height: 60px;
  display: flex;
  justify-content: flex-start;
  overflow: visible;
}

.mdc-card.table-card,
.mdc-card.filter-card {
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
}

.mdc-data-table,
.mdc-data-table__table-container,
.mdc-data-table__table {
  background: transparent !important;
  border: 0 !important;
}

.mdc-data-table__header-row,
.mdc-data-table__header-cell {
  background-color: #deeaff !important;
  font-weight: 600;
  color: #0a1452;
}

.mdc-data-table__table-container {
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  overflow: hidden;
}

/* ===============================
   SEARCH EXPAND
=================================*/

#gif-filter-box {
  position: absolute;
  left: 0;
  width: 30%;
  max-width: 100%;
  box-sizing: border-box;
  transition: width .3s ease;
}

.filter-card:focus-within #gif-filter-box,
#gif-filter-box.mdc-text-field--focused {
  width: 100%;
}

#gif-filter-box.mdc-text-field {
  border: 1px solid rgba(0, 0, 0, .38);
  border-radius: 9999px;
  overflow: hidden;
}

#gif-filter-box .mdc-notched-outline {
  display: none !important;
}

#gif-filter-box.mdc-text-field--focused {
  border-color: #0a1452 !important;
}

@media (max-width: 600px) {
  #gif-filter-box {
    width: 180px;
  }
  .filter-card:focus-within #gif-filter-box {
    width: 100%;
  }
}

/* ===============================
   PAGINATION
=================================*/

.mdc-data-table__pagination {
  background-color: #deeaff;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  border: 0;
}

.mdc-data-table__pagination .material-icons,
.mdc-data-table__pagination .mdc-select__selected-text {
  color: #0a1452;
}

.mdc-data-table__pagination .mdc-select .mdc-notched-outline__leading,
.mdc-data-table__pagination .mdc-select .mdc-notched-outline__notch,
.mdc-data-table__pagination .mdc-select .mdc-notched-outline__trailing {
  border-color: transparent !important;
}

.mdc-data-table__pagination .mdc-select.mdc-select--focused 
.mdc-notched-outline__leading,
.mdc-data-table__pagination .mdc-select.mdc-select--focused 
.mdc-notched-outline__notch,
.mdc-data-table__pagination .mdc-select.mdc-select--focused 
.mdc-notched-outline__trailing {
  border-color: #0a1452 !important;
}

#gif-table .mdc-data-table__cell {
  color: #0a1452;
  font-weight: 500;
}

#gif-rpp.mdc-select--outlined.mdc-select--focused {
  box-shadow: 0 0 0 2px #0a1452 inset !important;
}

#gif-rpp.mdc-select--focused .mdc-select__dropdown-icon-graphic {
  fill: var(--primary) !important;
}

#gif-rpp.mdc-select--focused .mdc-select__dropdown-icon-inactive,
#gif-rpp.mdc-select--focused .mdc-select__dropdown-icon-active {
  fill: var(--primary) !important;
}

.upload-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 32px;
  max-width: 520px;
  margin: 40px auto;
  box-shadow:
    0 10px 30px rgba(0,0,0,0.08),
    0 2px 8px rgba(0,0,0,0.04);
}

.upload-title {
  margin: 0;
  color: var(--primary);
  font-size: 28px;
  font-weight: 700;
}

.upload-subtitle {
  margin: 6px 0 24px 0;
  color: #5c6280;
  font-size: 14px;
}

.upload-dropzone {
  background: #f1f3f6;
  border-radius: 18px;
  padding: 60px 20px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;

  cursor: pointer;
  transition: all 0.25s ease;
}

.upload-dropzone:hover {
  background: #e7ebf2;
  transform: translateY(-3px);
}

.upload-icon {
  font-size: 40px;
  color: var(--primary);
}

.upload-text {
  color: var(--primary);
  font-weight: 500;
}

.explorer-title {
  flex: 1;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
}



.explorer-btn {
  width: 40px;
  height: 40px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: transparent;
  border: none;
  border-radius: 50%;

  color: var(--primary);
  font-size: 20px;
  cursor: pointer;

  transition: background 0.2s ease;
}

.explorer-btn:hover {
  background: rgba(0,0,0,0.05);
}