/* assets/admin.css */

/* Tabs */
#posttopdf-tabs {
  margin-bottom: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.posttopdf-tab-btn {
  background: #f1f1f1;
  border: 1px solid #ccc;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 4px;
  font-weight: 600;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  user-select: none;
}

.posttopdf-tab-btn:hover {
  background-color: #eaeaea;
}

.posttopdf-tab-btn.active,
.posttopdf-tab-btn:focus {
  background-color: #0073aa;
  border-color: #0073aa;
  color: #fff;
  outline: none;
}

/* Search input */
#posttopdf-search {
  width: 100%;
  max-width: 320px;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 5px;
  margin-bottom: 15px;
  font-size: 14px;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}

#posttopdf-search:focus {
  border-color: #0073aa;
  outline: none;
}

/* Post list container */
#posttopdf-post-list-container {
  max-height: 420px;
  overflow-y: auto;
  border: 1px solid #ddd;
  background: #fff;
  padding: 12px 15px;
  border-radius: 5px;
  font-size: 14px;
}

#posttopdf-post-list-container label {
  display: inline-block;
  width: 100%;
  margin: 0;
  padding: 0 2px;
  line-height: 1.2;
  border-radius: 2px;
}

#posttopdf-post-list-container label:hover {
  background-color: #f9f9f9;
}

#posttopdf-post-list-container input[type="checkbox"] {
  margin-right: 10px;
  vertical-align: middle;
  cursor: pointer;
}

/* Pagination */
#posttopdf-pagination {
  margin-top: 12px;
  text-align: center;
}

#posttopdf-pagination .button {
  margin: 4px 6px;
  min-width: 90px;
}

/* Selected counter + reset */
#posttopdf-selected-wrapper {
  margin-top: 10px;
}

#posttopdf-selected-count {
  font-weight: 600;
  font-size: 15px;
  color: #333;
  user-select: none;
}

#posttopdf-reset-btn {
  background-color: #f44336;
  border-color: #f44336;
  color: #fff;
  transition: background-color 0.3s ease;
  margin-left: 15px;
}

#posttopdf-reset-btn:hover {
  background-color: #d32f2f;
  border-color: #d32f2f;
  color: #fff;
}

/* Action buttons */
.posttopdf-buttons {
  margin-top: 15px;
}

#posttopdf-preview-btn,
#posttopdf-generate-btn {
  min-width: 130px;
  padding: 8px 18px;
  font-weight: 600;
  border-radius: 5px;
  transition: background-color 0.3s ease;
  user-select: none;
}

#posttopdf-preview-btn {
  background-color: #f0f0f0;
  border: 1px solid #ccc;
  color: #444;
  margin-right: 12px;
}

#posttopdf-preview-btn:hover {
  background-color: #e2e2e2;
}

#posttopdf-generate-btn {
  background-color: #0073aa;
  border-color: #0073aa;
  color: #fff;
}

#posttopdf-generate-btn:hover {
  background-color: #005d8f;
  border-color: #005d8f;
  color: #fff;
}

/* Preview modal */
#posttopdf-preview-modal {
  display: none;
  position: fixed;
  top: 8%;
  left: 8%;
  width: 84%;
  height: 84%;
  background: #fff;
  border: 1px solid #ccc;
  z-index: 99999;
  padding: 15px;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  box-sizing: border-box;
}

#posttopdf-preview-close {
  background-color: #f44336;
  border: none;
  color: #fff;
  padding: 6px 14px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  float: right;
  margin-bottom: 10px;
  user-select: none;
  transition: background-color 0.3s ease;
}

#posttopdf-preview-close:hover {
  background-color: #d32f2f;
}

#posttopdf-preview-frame {
  width: 100%;
  height: calc(100% - 40px);
  border: none;
  border-radius: 4px;
  box-sizing: border-box;
}

/* Lista post */
.posttopdf-post-label {
  display: block;
  padding: 5px 0;
  cursor: pointer;
}

/* Evidenzia solo titolo */
.posttopdf-post-title-highlight {
  background-color: #ffffcc;
  padding: 2px 5px;
  border-radius: 3px;
}

/* Se vuoi un bordo o ombra per la cover */
.posttopdf-post-cover {
  border-radius: 3px;
  background-color: #f2f2f2; /* colore neutro */
}
