/* ================================
   Admin Settings Page Styling
   ================================ */

/* Each selection block */
.fpc-selection {
    margin-bottom: 20px;          /* space between rows */
    position: relative;           /* dropdown positions correctly */
    display: flex;
    flex-direction: column;
    max-width: 400px;
}

/* Label styling */
.fpc-selection label {
    font-weight: bold;
    margin-bottom: 6px;
    color: #333;
}

/* Input styling */
.fpc-search {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    width: 100%;
    box-sizing: border-box;
}

/* Dropdown container */
.fpc-search-results {
    position: absolute;
    top: 100%;                    /* directly below input */
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-top: 4px;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 999;
    display: none;
}

/* Dropdown list */
.fpc-dropdown {
    list-style: none;
    margin: 0;
    padding: 0;
}

.fpc-result-item {
    padding: 10px 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.fpc-result-item:hover {
    background: #fd0094;
    color: #fff;
}

/* Searching / No results / Error states */
.fpc-searching,
.fpc-no-results,
.fpc-error {
    padding: 10px 12px;
    font-style: italic;
    color: #666;
}

/* Save status message */
#fpc-save-status {
    margin-top: 10px;
    font-weight: bold;
}

/* Preview box */
#fpc-preview {
    margin-top: 20px;
    border: 2px solid #fd0094;
    padding: 15px;
    border-radius: 8px;
    background: #fff;
}


/* featured-posts-list layout */
.featured-posts-list {
  display: grid;
  grid-auto-flow: column;              /* items flow horizontally */
  grid-template-rows: 1fr;             /* only one row */
  grid-auto-columns: minmax(180px, 1fr);
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  list-style: none;
  padding: 0 0;
  margin: 0;
}

.featured-post {
  scroll-snap-align: start;
  padding: 0;
  overflow: hidden;
  position: relative;
  transition: transform 0.3s ease, background-color 0.3s ease;
  background-color: transparent;
}

.featured-posts-list-container {
  padding: 0 0 0 0;
  margin: 0 0 35px 0;
}

.featured-post:hover img {
  filter: brightness(70%);
}

body.dark-mode .featured-post:hover img {
  filter: brightness(50%); /* corrected from invalid darkness() */
}

.featured-post-type a {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.7);
  color: #f0f0f0;
  padding: 3px 6px;
  font-size: 0.75rem;
  border-radius: 4px;
  z-index: 2;
  text-decoration: none;
}


.featured-post-thumbnail {
  position: relative;
  width: 100%;
  aspect-ratio: 6 / 4; /* square thumbnails */
  overflow: hidden;
}

.featured-post-thumbnail img {
  width: 100%;
  height: 100%;
  border-radius: 4px;
  object-fit: cover;
  display: block;
}

.featured-post-info {
  padding: 10px 0 0 0;
}

.featured-post-title {
  font-size: 0.95rem;
  line-height: 1.5rem;
  font-weight: bold;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  display: block;
  max-width: 100%;
}

.featured-post-title a {
  text-decoration: none;
  color: inherit;
}

/* Artist name below the title */
.featured-post-artist {
  font-size: 0.875rem;
  margin-top: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  display: block;
  max-width: 100%;
}

.featured-post-artist a {
  font-size: 0.875rem;
  text-decoration: none;
  color: #777;
  font-weight: 400;
}

body.dark-mode .featured-post-artist a {
  color: #999;
}

.featured-no-thumbnail {
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  height: 100%;
}

.featured-posts-list {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* Internet Explorer 10+ */
}

.featured-posts-list::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.featured-posts-list-container {
  position: relative; /* so arrows overlay correctly */
}

.featured-arrow {
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  font-size: 1.5rem;
  padding: 8px 12px;
  cursor: pointer;
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  z-index: 5;
  border-radius: 50%;
}

.featured-arrow-prev { left: 5px; }
.featured-arrow-next { right: 5px; }

.featured-arrow:hover {
  background: rgba(0,0,0,0.8);
}
