/* =========================================================
   Tidy Related Posts — Frontend Styles
   ========================================================= */

/* ---------------------------------------------------------
   Base
   --------------------------------------------------------- */

.tdrp-related {
	margin:    2em 0;
	font-size: 1em;
}

.tdrp-related__heading {
	margin:      0 0 .8em;
	font-size:   1.2em;
	font-weight: 700;
	color:       inherit;
}

/* ---------------------------------------------------------
   List layout
   --------------------------------------------------------- */

.tdrp-related--list .tdrp-related__list {
	list-style: none;
	margin:     0;
	padding:    0;
}

.tdrp-related--list .tdrp-related__item {
	padding:       .5em 0;
	border-bottom: 1px solid rgba(0,0,0,.07);
}

.tdrp-related--list .tdrp-related__item:last-child {
	border-bottom: none;
}

.tdrp-related--list .tdrp-related__item a {
	text-decoration: none;
	color:           inherit;
	font-weight:     500;
}

.tdrp-related--list .tdrp-related__item a:hover {
	text-decoration: underline;
}

.tdrp-related__date {
	display:    inline-block;
	margin-left: .5em;
	font-size:  .85em;
	color:      #64748b;
}

/* ---------------------------------------------------------
   Cards layout
   --------------------------------------------------------- */

.tdrp-related--cards .tdrp-related__cards {
	display:   flex;
	gap:       16px;
	flex-wrap: wrap;
}

.tdrp-card {
	display:       flex;
	flex-direction: column;
	flex:          1 1 200px;
	max-width:     280px;
	border:        1px solid rgba(0,0,0,.08);
	border-radius: 10px;
	overflow:      hidden;
	text-decoration: none;
	color:         inherit;
	background:    #fff;
	transition:    box-shadow .15s, transform .15s;
}

.tdrp-card:hover {
	box-shadow: 0 4px 16px rgba(0,0,0,.1);
	transform:  translateY(-2px);
}

.tdrp-card__thumb {
	aspect-ratio: 16 / 9;
	overflow:     hidden;
}

.tdrp-card__img {
	width:      100%;
	height:     100%;
	object-fit: cover;
	display:    block;
}

.tdrp-card__body {
	padding: 14px 16px;
}

.tdrp-card__title {
	display:     block;
	font-size:   .95em;
	font-weight: 600;
	color:       #1e293b;
	line-height: 1.35;
}

.tdrp-card__date {
	display:    block;
	margin-top: 4px;
	font-size:  .8em;
	color:      #64748b;
}

.tdrp-card__excerpt {
	display:    block;
	margin-top: 6px;
	font-size:  .85em;
	color:      #475569;
	line-height: 1.5;
}

/* ---------------------------------------------------------
   Grid layout
   --------------------------------------------------------- */

.tdrp-related--grid .tdrp-related__grid {
	display:               grid;
	grid-template-columns: repeat( auto-fill, minmax( 180px, 1fr ) );
	gap:                   16px;
}

.tdrp-grid__item {
	display:        flex;
	flex-direction: column;
	text-decoration: none;
	color:          inherit;
	border:         1px solid rgba(0,0,0,.08);
	border-radius:  10px;
	overflow:       hidden;
	background:     #fff;
	transition:     box-shadow .15s;
}

.tdrp-grid__item:hover {
	box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

.tdrp-grid__thumb {
	aspect-ratio: 4 / 3;
	overflow:     hidden;
}

.tdrp-grid__img {
	width:      100%;
	height:     100%;
	object-fit: cover;
	display:    block;
}

.tdrp-grid__title {
	display:     block;
	padding:     12px 14px;
	font-size:   .9em;
	font-weight: 600;
	color:       #1e293b;
	line-height: 1.35;
}

.tdrp-grid__date {
	display:    block;
	padding:    0 14px 12px;
	font-size:  .78em;
	color:      #64748b;
}

/* ---------------------------------------------------------
   Minimal layout
   --------------------------------------------------------- */

.tdrp-related--minimal .tdrp-related__nav {
	display:   flex;
	flex-wrap: wrap;
	gap:       8px;
}

.tdrp-related--minimal .tdrp-related__link {
	display:        inline-block;
	padding:        6px 14px;
	border:         1px solid rgba(0,0,0,.1);
	border-radius:  20px;
	font-size:      .85em;
	text-decoration: none;
	color:          inherit;
	transition:     background .15s, color .15s;
}

.tdrp-related--minimal .tdrp-related__link:hover {
	background: #1e293b;
	color:      #fff;
	border-color: #1e293b;
}

/* ---------------------------------------------------------
   Auto Link Inserter — Shared
   --------------------------------------------------------- */

.tdrp-auto-link {
	margin: 1.2em 0;
}

/* ---------------------------------------------------------
   Auto Link — Inline
   --------------------------------------------------------- */

.tdrp-auto-link--inline-block {
	display: inline;
	margin:  0 .2em;
}

.tdrp-auto-link--inline-block a {
	text-decoration: underline;
	text-decoration-style: dotted;
	text-underline-offset: 2px;
	color: inherit;
}

.tdrp-auto-link--inline-block a:hover {
	text-decoration-style: solid;
}

/* ---------------------------------------------------------
   Auto Link — Read Also
   --------------------------------------------------------- */

.tdrp-auto-link--read-also {
	display:       flex;
	align-items:   center;
	gap:           8px;
	padding:       14px 18px;
	background:    #f8fafc;
	border-left:   4px solid #0073aa;
	border-radius: 6px;
}

.tdrp-auto-link__label {
	font-weight: 600;
	white-space: nowrap;
	color:       #1e293b;
}

.tdrp-auto-link__title {
	text-decoration: none;
	color:           #0073aa;
	font-weight:     500;
}

.tdrp-auto-link__title:hover {
	text-decoration: underline;
}

/* ---------------------------------------------------------
   Auto Link — Visual Card
   --------------------------------------------------------- */

.tdrp-auto-link--card {
	max-width: 480px;
}

.tdrp-auto-link__card-inner {
	display:         flex;
	align-items:     stretch;
	text-decoration: none;
	color:           inherit;
	background:      #fff;
	border:          1px solid rgba(0,0,0,.08);
	border-radius:   10px;
	overflow:        hidden;
	transition:      box-shadow .15s, transform .15s;
}

.tdrp-auto-link__card-inner:hover {
	box-shadow: 0 4px 16px rgba(0,0,0,.1);
	transform:  translateY(-2px);
}

.tdrp-auto-link__card-thumb {
	flex:     0 0 120px;
	overflow: hidden;
}

.tdrp-auto-link__card-thumb img {
	width:      100%;
	height:     100%;
	object-fit: cover;
	display:    block;
}

.tdrp-auto-link__card-body {
	flex:    1 1 auto;
	padding: 14px 16px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.tdrp-auto-link__card-title {
	display:     block;
	font-size:   .95em;
	font-weight: 600;
	color:       #1e293b;
	line-height: 1.35;
}

.tdrp-auto-link__card-excerpt {
	display:    block;
	margin-top: 6px;
	font-size:  .85em;
	color:      #475569;
	line-height: 1.5;
}

/* ---------------------------------------------------------
   Auto Link — Minimal SEO
   --------------------------------------------------------- */

.tdrp-auto-link--minimal {
	font-size: .95em;
}

.tdrp-auto-link--minimal a {
	text-decoration: underline;
	color:           inherit;
}

.tdrp-auto-link--minimal a:hover {
	color: #0073aa;
}

/* ---------------------------------------------------------
   Auto Link — Responsive
   --------------------------------------------------------- */

@media (max-width: 600px) {
	.tdrp-auto-link--read-also {
		flex-direction: column;
		align-items:    flex-start;
		gap:            4px;
	}

	.tdrp-auto-link__card-inner {
		flex-direction: column;
	}

	.tdrp-auto-link__card-thumb {
		flex:         0 0 auto;
		aspect-ratio: 16 / 9;
	}
}
