/* Custom site styles */

.hero-section {
    background-color: #212529;
    padding: 1.5rem 0;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" fill="rgba(255,255,255,0.05)"/></svg>');
    opacity: 0.3;
    z-index: 1;
    pointer-events: none;
}

.hero-section > .container {
    position: relative;
    z-index: 2;
}

/* Episode Card Styles */
.episode-card {
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s;
    position: relative;
}

.episode-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.episode-card a {
    display: block;
}

.episode-image {
    height: 100px;
    max-width: 116.3px;
    max-height: 100px;
    object-fit: contain;
    background-color: #f8f9fa;
    display: block;
    position: relative;
}

.episode-details-col {
    max-height: 100px;
    align-items: flex-start;
}

.col-auto.position-relative {
    height: 100px;
    display: flex;
    align-items: center;
}

.rating-badge {
    position: absolute;
    top: 0.2rem;
    right: 0.2rem;
    padding: 0.25rem 0.5rem;
    border-radius: 2rem;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 5;
}

.good-rating {
    background-color: #198754;
}

.mixed-rating {
    background-color: #ffc107;
    color: #000;
}

.bad-rating {
    background-color: #dc3545;
}

.episode-header {
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding-bottom: 0.75rem;
}

.card-text {
    font-size: 0.95rem;
    line-height: 1.6;
}

.episode-card .card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.episode-actions {
    z-index: 10;
    visibility: hidden;
    margin-top: auto;
}

.episode-actions:not(.d-none) {
    visibility: visible;
}

/* Styles for Episode Detail page */

#main-rating-buttons.btn-group > .btn {
    margin: 0;
    border-radius: 0;
}

#main-rating-buttons.btn-group > .btn:first-child {
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

#main-rating-buttons.btn-group > .btn:last-child {
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

.card-body .btn-group#main-rating-buttons {
     margin-top: 0;
     padding-top: 0;
     margin-bottom: 1rem;
}

@media (max-width: 767.98px) {
    .episode-card {
        max-height: none;
    }

    .episode-image {
        width: 100%;
        height: auto;
        max-height: 200px;
        max-width: 232.6px;
        margin: 0 auto;
    }

    .col-auto.position-relative {
        height: auto;
    }

    .col-12.col-sm-auto.position-relative.text-center {
        height: auto;
        background-color: #f8f9fa;
    }

    .card-body .btn-group#main-rating-buttons {
         position: static;
         margin-top: 1rem;
         text-align: center;
         display: flex;
         justify-content: center;
    }
}

.card {
    max-width: 800px;
    margin: 0 auto;
}

.card-like-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
}

/* User Menu */
.user-menu {
    position: relative;
    cursor: pointer;
}

.user-menu-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    background-color: #fff;
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    min-width: 10rem;
    z-index: 1000;
    display: none;
}

.user-menu-dropdown.show {
    display: block;
}

.user-menu-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    color: #212529;
    text-decoration: none;
    transition: background-color 0.15s ease-in-out;
}

.user-menu-item:hover {
    background-color: #f8f9fa;
    color: #212529;
}

.episode-summary-text {
    font-size: 0.75em;
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Add custom styles for the collection filter dropdown */
.collection-filter-dropdown-menu {
    width: 380px;
}

.collection-filter-dropdown-menu .dropdown-item {
    white-space: normal;
    word-wrap: break-word;
    padding-left: 1.5rem;
    text-indent: -0.5rem;
}

/* Add styles for the filter text display in the dropdown button */
.filter-text-display {
    display: inline-block;
    max-width: 230px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    transform: translateY(-1.3px);
}

/* Add padding to the top of page content */
.page-content-top-padding {
    padding-top: 30px;
}

/* Add styles for the episode count badge */
.episode-count-badge {
    display: inline-block;
    padding: .25em .4em;
    font-size: 85%;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: .25rem;
    background-color: #007bff;
    color: white;
    margin-top: 5px;
}

/* Add specific vertical alignment for the custom collections checkbox */
.form-check-input {
    vertical-align: middle;
}

/* Styles for the inline form check containing the custom collections checkbox */
.form-check.form-check-inline {
    padding-bottom: 0;
    margin-bottom: 0;
}

/* Custom styles for filter/sort/count alignment */
.card-like-container .d-flex.align-items-center.mb-3 {
    justify-content: space-between;
    width: 100%;
}

.card-like-container .d-flex.align-items-center.mb-3 > .flex-grow-1 {
    flex-grow: 1;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.card-like-container .dropdown.me-auto {
    margin-right: auto;
}

.card-like-container .d-flex.align-items-center.ms-auto {
     margin-left: auto;
}

/* Adjust episode-count-badge style if needed */
.episode-count-badge {
    display: inline-block;
    margin-top: 0;
}

.sort-link {
    color: #007bff;
    text-decoration: none;
    cursor: pointer;
    &::after {
        display: none;
    }
}
.sort-link:hover {
    text-decoration: underline;
}
.dropdown-item i {
    margin-right: .5rem;
}

/* Add styles for the sort criteria dropdown */
.sort-criteria-dropdown {
    width: 181.35px;
    text-align: right;
}

/* Add styles for the episode count column to ensure centering */
.episode-count-column {
    display: flex;
    justify-content: center;
    align-items: center;
}

html {
  position: relative;
  min-height: 100%;
}

.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  min-height: 100px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
}

/* Add media query for mobile styles */
@media (max-width: 768px) {
    body { /* Adjust body margin for mobile */
        margin-bottom: 0;
    }
    .footer {
        height: auto;
        padding: 20px 10px;
        margin-top: 20px;
        display: block;
        color: #333; /* Explicitly set color for mobile */
    }
}

/* Style for the container holding episode review counts and actions */
.episode-actions-container {
    width: 80px;
    flex-shrink: 0;
}

.dropdown-menu {
    padding-top: 0;
    padding-bottom: 0;
}

.form-control {
    font-size: 0.95rem;
}

/* Add hover focus style to summary display */
#summary-display:hover {
    outline: 2px solid #86b7fe;
    outline-offset: 3px;
    box-shadow: none;
    cursor: pointer;
    border-radius: 0.375rem;
}

/* Ensure textarea in edit mode still has default focus style */
#summary-edit-form .form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Styles for Critics Review page */
.wondr-page-container {
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: background-color 0.3s ease;
    min-height: 80vh;
    background-color: #f4f4f4;
    overflow: clip;
}

@keyframes quick-fade-float-in {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.wondr-page-episode-card {
    /* Ensure default state is visible and in final position */
    opacity: 1;
    transform: translateY(0);
    /* Remove animation property from the default class */
    /* animation: quick-fade-float-in 0.3s ease-out forwards; */
    width: 85%;
    max-width: 550px;
    margin: 20px auto;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 0;
}

.wondr-page-episode-card.quick-fade-float-in {
    animation: quick-fade-float-in 0.3s ease-out forwards;
}

.wondr-page-episode-card .episode-details h5,
.wondr-page-episode-card .episode-details p {
    font-size: 1.05rem;
}

.wondr-page-episode-card .episode-details h5 {
    font-size: 1.25rem;
    font-weight: bold;
    margin-top: 0;
    text-align: center;
}

.wondr-page-episode-card .episode-details .small {
     font-size: 0.95rem;
}

.wondr-page-episode-card .episode-details > div > .d-flex {
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.wondr-page-episode-card .episode-details > div > .d-flex .ms-2 {
     margin-left: 0;
     margin-top: 5px;
}

.wondr-page-episode-card .episode-summary-text {
    text-align: center;
    font-size: 0.9rem;
    margin-top: 10px;
    display: block;
    line-clamp: unset;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
    overflow: visible;
    max-height: none;
    white-space: normal;
}

.wondr-actions {
    text-align: center;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 550px;
    position: sticky;
    bottom: 10px;
    z-index: 10;
    margin-bottom: 30px;
}

.wondr-actions button {
     margin: 0 10px;
     width: 60px;
     height: 60px;
     border-radius: 50%;
     display: inline-flex;
     justify-content: center;
     align-items: center;
     border: none;
     cursor: pointer;
     transition: color 0.2s ease-in-out;
     color: white;
}

.wondr-page-episode-card .episode-image-container {
    max-width: 80%;
    width: 100%;
    margin: 20px auto;
    background-color: #f0f0f0;
    background-image: repeating-linear-gradient(45deg, #e0e0e0 2px, #f0f0f0 2px, #f0f0f0 10px);
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    aspect-ratio: 500 / 430;
}

.wondr-page-episode-card .episode-image-container > * {
    display: flex;
    justify-content: center;
    align-items: center;
}

.wondr-page-episode-card .episode-artwork {
    max-width: 100%;
    max-height: 100%;
    height: auto;
    width: auto;
    object-fit: contain;
    display: block;
    border-radius: 8px;
}

.wondr-page-episode-card .no-artwork {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e9ecef;
    color: #6c757d;
    text-align: center;
    border-radius: 8px;
    font-size: 1.2em;
}

.wondr-actions .skip-button {
    background-color: #6c757d;
    border-color: #6c757d;
    font-size: 2rem;
}

.wondr-actions .skip-button:hover {
     background-color: #5a6268;
     border-color: #545b62;
 }

.wondr-actions .disapprove-button {
    background-color: #4682b4;
    border-color: #4682b4;
    font-size: 2.5rem;
}

.wondr-actions .disapprove-button:hover {
     background-color: #3a6c95;
     border-color: #36668a;
 }

.wondr-actions .approve-button {
    background-color: #ff69b4;
    border-color: #ff69b4;
    font-size: 2.5rem;
}

.wondr-actions .approve-button:hover {
      background-color: #ff52a0;
      border-color: #ff499a;
  }

.wondr-page-episode-card .episode-details {
    padding: 0 8px 8px 8px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.wondr-page-episode-card .episode-details h2,
.wondr-page-episode-card .episode-details h3,
.wondr-page-episode-card .episode-details p {
    margin-bottom: 5px;
}

.wondr-actions .disapprove-button i, .wondr-actions .approve-button i {
    font-size: 2.5rem;
    position: unset;
    top: unset;
}

.wondr-actions .skip-button i {
    font-size: 1.5rem;
    position: unset;
    top: unset;
}

.wondr-actions .disapprove-button, .wondr-actions .approve-button {
    width: 80px;
    height: 80px;
}

.wondr-page-episode-card .no-more-episodes {
    text-align: center;
    padding: 40px;
    color: #555;
    margin-top: 50px;
}

.wondr-page-episode-card .no-more-episodes h2 {
    color: #333;
    margin-bottom: 10px;
}

body {
    overflow-x: hidden;
}

.wondr-page-episode-card .episode-details h5 {
    text-align: center;
}

.wondr-page-episode-card .episode-details > div > .d-flex h5 {
    text-align: center;
}

.wondr-page-episode-card .card-body .episode-details > div > .d-flex h5 {
    text-align: center;
}

.wondr-actions .approve-button i {
    font-size: 2.5rem;
    position: unset;
    top: unset;
    transform: translateY(2px); /* Shift down by 2px */
}

.episode-detail-container {
    padding-bottom: 3rem;
}