/* CSS variables to be changed in admin menu */
.pdsuite{
  --pdsuite-primary-color: #2b2b2b;
  --pdsuite-radius: 10px;
}

/* Containers */
.pdsuite-results,
.pdsuite-grid,
.pdsuite-list{
    width: 100%;
}

.pdsuite-grid{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    grid-gap: 20px;
    width: 100%;
}

.pdsuite-list{
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-width: 1200px;
    grid-gap: 20px;
}

/* Icons / meta */
.pdsuite-meta-item i{
    font-weight: bold;
    margin-right: 10px;
    font-size: 14px;
    vertical-align: middle;
}

/* Grid cards (match .post-card) */
.pdsuite-grid .pdsuite-item{
    background-color: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 590px;
    position: relative;
}

/* List items (match .post-list-item) */
.pdsuite-list .pdsuite-item{
    display: flex;
    flex-direction: row;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 20px;
}

/* Thumbnail */
.pdsuite-grid .pdsuite-thumb{
    width: 100%;
    min-height: 300px;
    object-fit: cover;
    margin-bottom: 10px;
    max-height: 300px;
}

.pdsuite-list .pdsuite-thumb{
    width: 250px;
    height: 300px;
    object-fit: cover;
    margin: 10px 30px 20px 10px;
}

/* Title */
.pdsuite-grid .pdsuite-title{
    font-size: 20px;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Excerpt and meta */
.pdsuite-excerpt,
.pdsuite-meta{
    color: #666;
    margin-bottom: 10px;
}

.pdsuite-grid .pdsuite-excerpt{
    min-height: 165px;
    max-height: 250px;
    overflow: hidden;
}

/* Body */
.pdsuite-body{
    flex-grow: 1;
}

/* Read more button (match search cards) */
.pdsuite-readmore{
    display: inline-block;
    padding: 10px 20px;
    border: 2px solid #333;
    border-radius: 5px;
    background-color: transparent;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translate(-50%, -50%);
}

.pdsuite-readmore:hover{
    background-color: #333;
    color: #fff;
}

/* Load more button */
.pdsuite .pdsuite-load-more-wrap .pdsuite-load-more{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding: 12px 18px;
    border: 0;
    border-radius: var(--pdsuite-radius);
    background: var(--pdsuite-primary-color);
    color: #fff;
    text-decoration:none;
    cursor:pointer;
    margin-top: 14px;
}

.pdsuite-load-more:hover{
    opacity: .92;
}

/* Search form wrapper */
.pdsuite-form{
    max-width: 1200px;
    margin: 0 auto 20px;
}
.pdsuite-form label{
    font-weight: 600;
}
.pdsuite-form input[type="text"],
.pdsuite-form input[type="number"],
.pdsuite-form select{
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    box-sizing: border-box;
}

.pdsuite-row-dates .pdsuite-field{
    flex: 1 1 180px;
    max-width: 260px;
}

.pdsuite-row-main{
    margin-top: 10px;
}

.pdsuite-row-submit{
    margin-top: 12px;
}

.pdsuite.pdsuite-mode-search .pdsuite-form .pdsuite-row-submit .pdsuite-submit{
    width: 100%;
    padding: 5px 10px;
    border: 0;
    border-radius: var(--pdsuite-radius);
    cursor: pointer;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    background: var(--pdsuite-primary-color);
    color: #fff;
}
.pdsuite-submit:hover{
    opacity: .92;
}

/* Search form layout + filters */
.pdsuite-row{
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.pdsuite-field{
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pdsuite-field-q{
    flex: 1 1 320px;
}

.pdsuite.pdsuite-mode-search .pdsuite-form .pdsuite-toggle-filters{
    margin: 10px 0 0;
    padding: 5px 10px;
    border: 0;
    background: var(--pdsuite-primary-color);
    color: #fff;
    border-radius: var(--pdsuite-radius);
    cursor: pointer;
    width: 100%;
}
.pdsuite-toggle-filters:hover{
    opacity: .92;
}

.pdsuite-filters{
    margin-top: 14px;
    padding: 14px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fff;
}

.pdsuite-checks{
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.pdsuite-checks-scroll{
    max-height: 220px;
    overflow: auto;
    padding-right: 6px;
}

.pdsuite-tag-filter{
    width: 100%;
    margin-bottom: 10px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
}


/* ---- Original Search CSS (kept for backward compatibility) ---- */

/* Base styles for the grid and list layouts */
#post-display-search-results,
.post-list {
    width: 100%;
}

.author-icon, .date-icon, .comments-icon {
    font-weight: bold;
    margin-right: 10px;
    font-size: 14px;
    vertical-align: middle;
}

#post-display-search-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    grid-gap: 20px;
    width: 100%;
}

.post-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    max-width: 1200px;
    margin: 0 auto;
    grid-gap: 20px;
}

/* Styles for individual post cards in grid layout */
#post-display-search-results .post-card {
    background-color: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
	min-height: 590px;
	position: relative;
}

#post-display-search-results .post-card .post-content .post-excerpt {
	min-height: 165px;
	max-height: 250px;
}

/* Styles for individual post list items in list layout */
.post-list .post-list-item {
    display: flex;
    flex-direction: row-reverse;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
    transition: transform 0.2s ease;
    width: calc(50% - 16px); 
    height: 290px;
    padding: 0;
    box-sizing: border-box;
}

.post-list .post-list-item:hover {
    transform: scale(1.02);
}

.post-list .post-list-item .post-thumbnail {
    width: 260px;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 0 8px 8px 0;
    margin: 0;
}

.post-list .post-list-item .post-content {
    padding: 15px 0 1px 20px;
    flex: 1;
}

.post-list .post-list-item .post-content .post-title {
    margin: 0;
    font-size: 1.25em;
    color: #333;
}

.post-list .post-list-item .post-content .post-excerpt p {
    margin: 8px 0;
    color: #555;
}

.post-list .post-list-item .post-content .post-excerpt .star-rating {
    font-size: 14px;
    margin-bottom: 8px;
}

.post-list .post-list-item .post-content .read-more {
    color: #d18ac4;
    text-decoration: none;
    font-weight: bold;
    margin-top: 8px;
    display: inline-block;
}

.post-list .post-list-item .post-content .read-more:hover {
    text-decoration: underline;
}

#post-display-search-results .post-card .post-thumbnail {
	width: 100%;
	min-height: 300px;
	object-fit: cover;
	margin-bottom: 10px;
	max-height: 300px;
}

/* List layout */
.post-list .post-thumbnail {
    width: 250px;
    height: 300px;
    object-fit: cover;
    margin: 10px 30px 20px 10px;
}

#post-display-search-results .post-title {
    font-size: 20px;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Styling for post excerpts and details */
#post-display-search-results .post-excerpt,
#post-display-search-results .post-details {
    color: #666;
    margin-bottom: 10px;
}

.author-info,
.date-icon,
.comments-icon {
    font-weight: bold;
    margin-right: 10px;
    font-size: 14px;
    vertical-align: middle;
}

#post-display-search-results .read-more {
	display: inline-block;
	padding: 10px 20px;
	border: 2px solid #333;
	border-radius: 5px;
	background-color: transparent;
	color: #333;
	text-decoration: none;
	transition: background-color 0.3s, color 0.3s;
	position: absolute;
	bottom: -15px;
	left: 50%;
	transform: translate(-50%, -50%);
}

#post-display-search-results .read-more:hover {
    background-color: #333;
    color: #fff;
}

#post-display-search-results .post-content {
    flex-grow: 1;
} 

.entry-content .post-list li {
	margin-left: 0em;
	margin-bottom: 6px;
}
/* Adjust for smaller screens */
@media (max-width: 1520px) {
  #post-display-search-results .post-card {
    min-height: calc(590px - (1920px - 115vw) * 0.25);
  }
}

@media (max-width: 1205px) {
    #post-display-search-results {
        grid-template-columns: repeat(3, 30vw);
    }
}

@media (max-width: 900px) {
    #post-display-search-results {
        grid-template-columns: repeat(2, 40vw);
    }
}

@media (max-width: 768px) {
	.post-list {
		width: 100%;
		overflow: auto;
		max-width: 100%;
	}
    .post-list .post-list-item {
        width: 10em;
        flex-direction: column;
        height: auto;
        margin: 8px 0;
    }

    .post-list .post-list-item .post-thumbnail {
        width: 100%;
        height: 180px;
        border-radius: 0 0 8px 8px;
    }

    .post-list .post-list-item .post-content {
        padding: 12px;
    }
}

@media (max-width: 758px) {
    #post-display-search-results {
        grid-template-columns: repeat(1, 90vw);
    }
}

@media (max-width: 568px) {
    #post-display-search-results .post-thumbnail {
        height: 150px;
    }

    #post-display-search-results .post-list-item,
    #post-display-search-results .post-card {
        flex-direction: column;
    }

    #post-display-search-results .post-thumbnail {
        width: 100%;
        margin-bottom: 10px;
    }

    #post-display-search-results .post-excerpt,
    #post-display-search-results .post-details {
        font-size: 16px;
    }
}

/* === PDS additions (non-destructive) === */
#search-tags-select { min-width: 260px; }
#search-tags-input { min-width: 260px; }
.pds-suggest {
  position: absolute;
  z-index: 9999;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 6px;
  margin-top: 4px;
  padding: 4px 0;
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
  width: 100%;
  box-sizing: border-box;
}
.pds-suggest li {
  list-style: none;
  padding: 8px 10px;
  cursor: pointer;
}
.pds-suggest li:hover, .pds-suggest li.active {
  background: #f3f4f6;
}
.pds-tags-wrap { position: relative; display: inline-block; width: 100%; max-width: 420px; }


/* ---- Suite responsive additions ---- */

/* Responsive tweaks for suite containers */
@media (max-width: 1520px) {
  .pdsuite-grid .pdsuite-item {
    min-height: calc(590px - (1920px - 115vw) * 0.25);
  }
}

@media (max-width: 1205px) {
    .pdsuite-grid {
        grid-template-columns: repeat(3, 30vw);
    }
}

@media (max-width: 900px) {
    .pdsuite-grid {
        grid-template-columns: repeat(2, 40vw);
    }
}

@media (max-width: 768px) {
    .pdsuite-list {
        width: 100%;
        overflow: auto;
        max-width: 100%;
    }
    .pdsuite-list .pdsuite-item {
        width: 10em;
        flex-direction: column;
        height: auto;
        margin: 8px 0;
    }

    .pdsuite-list .pdsuite-thumb {
        width: 100%;
        height: 180px;
        border-radius: 0 0 8px 8px;
        margin: 0;
    }

    .pdsuite-list .pdsuite-body {
        padding: 12px;
        position: relative;
    }

    .pdsuite-list .pdsuite-readmore{
        position: static;
        transform: none;
        margin-top: 8px;
    }
}

@media (max-width: 758px) {
    .pdsuite-grid {
        grid-template-columns: repeat(1, 90vw);
    }
}

@media (max-width: 568px) {
    .pdsuite-grid .pdsuite-thumb {
        height: 150px;
    }

    .pdsuite-grid .pdsuite-item{
        flex-direction: column;
    }

    .pdsuite-excerpt,
    .pdsuite-meta {
        font-size: 16px;
    }
}
