/* ════════════════════════════════════════════
   IPD — Image Print & Download  v1.3
   ════════════════════════════════════════════ */

/* ─── Обёртка ─── */
.ipd-actions,
.td-post-content .ipd-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 18px 0;
}

/* ─── Строка PDF + стрелка ─── */
.ipd-download-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  width: 100%;
}

/* ════ Базовая кнопка ════ */
.ipd-btn {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-sizing: border-box;
  border-radius: 9px;
  padding: 13px 22px;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  text-decoration: none !important;
  cursor: pointer;
  border: none;
  transition: background-color .18s ease, color .18s ease,
              border-color .18s ease, box-shadow .18s ease, transform .06s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,.10);
}

.ipd-btn:active { transform: translateY(1px); }

/* SVG-иконка */
.ipd-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
}
.ipd-icon svg { width: 22px; height: 22px; fill: currentColor; }

/* ════ Кнопка «Скачать PDF» (красная) ════ */
.ipd-download,
.ipd-download:visited,
.ipd-download-main,
.ipd-download-main:visited {
  flex: 1 1 auto;
  width: 100%;
  background: #c9172c !important;
  border: 1px solid #c9172c !important;
  color: #fff !important;
}
.ipd-download:hover,
.ipd-download:focus,
.ipd-download-main:hover,
.ipd-download-main:focus {
  background: #ad1224 !important;
  border-color: #ad1224 !important;
  color: #fff !important;
}

/* ════ Кнопка «Печать» ════ */
.ipd-print,
.ipd-print:visited {
  width: 100%;
  background: #fff !important;
  border: 1.5px solid #c9172c !important;
  color: #c9172c !important;
  box-shadow: none;
}
.ipd-print:hover,
.ipd-print:focus {
  background: #fff5f6 !important;
  color: #c9172c !important;
  border-color: #c9172c !important;
}

/* ════ Дропдаун ════ */
.ipd-dropdown {
  position: relative;
  flex: 0 0 50px;
}

.ipd-more {
  width: 50px;
  height: 50px;
  padding: 0;
  background: #f4f4f4 !important;
  color: #555 !important;
  border: 1.5px solid #ddd !important;
  box-shadow: none;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ipd-more svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  transition: transform .18s ease;
}
.ipd-dropdown.is-open .ipd-more svg { transform: rotate(180deg); }
.ipd-more:hover,
.ipd-more:focus {
  background: #e5e5e5 !important;
  color: #111 !important;
  border-color: #ccc !important;
}

/* ─── Выпадающее меню ─── */
.ipd-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 9999;
  min-width: 190px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e8d0d4;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.13);
}
.ipd-dropdown.is-open .ipd-menu { display: block; }

.ipd-menu-item {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 11px 16px !important;
  color: #c9172c !important;
  background: #fff;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none !important;
  white-space: nowrap;
  border-bottom: 1px solid #f5e7e9;
  transition: background .12s ease;
}
.ipd-menu-item:last-child { border-bottom: none; }
.ipd-menu-item:hover,
.ipd-menu-item:focus {
  background: #fff5f6 !important;
  color: #c9172c !important;
}

.ipd-menu-icon {
  display: inline-flex;
  flex-shrink: 0;
}
.ipd-menu-icon svg { width: 17px; height: 17px; fill: currentColor; }

/* ════ Мобильные ════ */
@media (max-width: 768px) {
  .ipd-actions,
  .td-post-content .ipd-actions {
    order: 1;
    margin-top: 14px;
    margin-bottom: 16px;
    gap: 10px;
  }
  .ipd-btn    { min-height: 46px; font-size: 14px; }
  .ipd-more   { width: 46px; height: 46px; }
  .ipd-icon svg { width: 20px; height: 20px; }
  .ipd-menu   { min-width: 170px; }
}
