/* style.css — minimal clean look */

.spotify-search-form {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  max-width: 100%;
}

.spotify-search-form input[type="text"] {
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 200px;
}

.spotify-search-form button {
  padding: 8px 14px;
  border: 1px solid #0073aa;
  background-color: #0073aa;
  color: white;
  border-radius: 4px;
  cursor: pointer;
}

.spotify-search-form button:hover {
  background-color: #005f8d;
}

#spotify-search-results {
  border-top: 1px solid #eee;
  padding-top: 20px;
  max-width: 100%;
}

.album-item {
  border-bottom: 1px solid #eee;
  padding: 15px 0;
}

.album-item .wrap-flex{
  display: flex;
  align-items: flex-start;
}

.album-item img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 6px;
  margin-right: 20px;
}

.album-details {
  flex: 1;
}

.album-meta p {
  margin: 4px 0;
  color: #444;
}

.album-tracks {
  margin-top: 15px;
}

.track-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 10px;
  border-bottom: 1px solid #f0f0f0;
}

.track-row-heading {
  padding: 6px 10px;
  border-bottom: 1px solid #f0f0f0;
}

.track-row:hover{
  /*background: rgba(29, 185, 84, 0.3);*/
  background: rgba(204, 204, 204, 0.3);
}

.track-vote button {
  margin-left: 5px;
  padding: 4px 8px;
  border: 1px solid #ccc;
  background-color: #f9f9f9;
  cursor: pointer;
  border-radius: 4px;
}

.track-vote button:hover {
  background-color: #eee;
}

.vote-button {
  margin-top: 15px;
  padding: 8px 12px;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.vote-button:hover {
  background: #218838;
}

.spotify-preview {
  margin-top: 10px;
}

/* Full width preview and tracklist */
.spotify-preview,
.album-tracks {
  width: 100%;
  margin-top: 15px;
}

/* Active vote states */
.track-vote button.vote-like.active {
  background-color: #d4edda;
  border-color: #28a745;
  color: #155724;
}

.track-vote button.vote-dislike.active {
  background-color: #f8d7da;
  border-color: #dc3545;
  color: #721c24;
}

.ssa-table{width:100%;border-collapse:collapse;margin-top:10px}
.ssa-table th,.ssa-table td{padding:8px;border-bottom:1px solid #eee;text-align:left;cursor:pointer}
.ssa-table th.desc::after{content:' ▼';}
.ssa-table th.asc::after{content:' ▲';}
.ssa-table img{object-fit:cover;}



#sidebar-wrapper{
  display: none;
}


tr.album-link:hover{
  background: #eaeaea;
}

/*
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

.table-wrapper table {
    width: 100%;
    min-width: 1200px; 
    border-collapse: collapse;
}

.table-wrapper::-webkit-scrollbar {
    height: 8px;
}
.table-wrapper::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 4px;
}
*/


.table-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

#ssa_dash_table {
    width: 100%;
    /*min-width: 1200px;*/
    border-collapse: collapse;
}

#ssa_dash_table th{
  font-size: 90%;
}

#ssa_dash_table th, 
#ssa_dash_table td {
    padding: 8px 12px;
    text-align: left;
}

#ssa_dash_table .album-row {
    cursor: pointer;
}

#ssa_dash_table .album-row:hover {
    background: rgba(0,0,0,0.04);
}

.ssa-dashboard.table-wrapper{
  /*width: 750px;*/
  max-width: 100%;
}

/*
-------------------------------------
Track Item Player
-------------------------------------
*/


#ssa-album-preview-panel {
    position: fixed;
    top: 0;
    right: -35%;
    width: 33%;
    height: 100vh;
    background: #111;
    transition: right 0.5s ease;
    z-index: 99999;
    display: flex;
    /*border-left: 2px solid #1db954;*/
    box-shadow: -3px 0 8px rgba(0,0,0,0.35);
}

/* When active (visible) */
#ssa-album-preview-panel.active {
    right: 0;
}

#ssa-preview-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: rgba(83, 83, 83, 1);
}

#ssa-resize-handle {
    width: 6px;
    cursor: ew-resize;
    background: rgba(255,255,255,0.1);
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
}
.ssa-album-preview-btn {
    background: #1db954;
    color: white;
    border: none;
    padding: 6px 14px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
}

/*
----------------
*/

/* container */
.spotify-preview-container {
    position: fixed;
    top: 0;
    right: -35%;
    width: 33%;
    height: 100vh;
    background: #121212;
    box-shadow: -2px 0 12px rgba(0,0,0,0.45);
    transition: right 0.5s ease;
    z-index: 9999;
    display: flex;
    flex-direction: column;
}
.spotify-preview-container.active {
    right: 0;
}

/* close button */
.spotify-preview-close {
  background: rgba(83, 83, 83, 1);
  border: none;
  width: 32px;
  color: #fff;
  line-height: 0.8;
  height: 32px;
  font-size: 26px;
  padding: 0;
  cursor: pointer;
  opacity: 1;
  position: absolute;
  top: 0px;
  left: -32px;
  padding-left: 0px;
  padding-right: 0;
}
.spotify-preview-close:hover { 
  background: rgba(51, 51, 51, 0.5);
}

/* iframe */
#spotify-preview-iframe {
    flex: 1;
    width: 100%;
    border: none;
}

/*
UI Improvements
*/

.album-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 20px;
  padding: 20px;
  margin-bottom: 30px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.album-cover img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}


.album-meta {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
}

.album-meta strong {
  color: #222;
}

.album-title {

}

.album-artist {

}

.album-rating {
  margin-top: 10px;
  font-size: 16px;
  font-weight: 600;
}

.album-rating span {
  color: #1db954; /* Spotify green */
  font-size: 20px;
}

.spotify-preview {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 16px;
  background: #1db954;
  color: #fff;
  border-radius: 20px;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.5s ease;
}

.spotify-preview:hover {
  background: #17a44a;
}

.tracklist {
  margin-top: 15px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}

.tracklist li {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
}

.vote-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid #ddd;
  background: #f8f8f8;
  cursor: pointer;
}

.vote-btn.active {
  background: #1db954;
  border-color: #1db954;
  color: #fff;
}

.dataTables_wrapper {
  margin-top: 50px;
}

table.dataTable {
  border-radius: 10px;
  overflow: hidden;
}

table.dataTable thead th {
  background: #f4f4f4;
  font-weight: 600;
}

.track_number{
  padding-right: 10px;
}

.duration_ms{
  padding: 0 15px;
  font-size: 90%;
  color: #7f8c8d;
}

.flex-wrap {
  display: inline-flex;
  align-items: center;
}

.flex-rows{
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.flex-row{
  display: inline-flex;
}

.track-name{
  font-weight: 500;
  font-size: 90%;
}

.track-artists{
  font-size: 80%;
  color: #7f8c8d;
  font-weight: 400;
}

/* Thumbnail */
.thumb {
  max-width: 300px;
  cursor: zoom-in;
  transition: transform .3s ease;
}

/* Hover zoom on thumbnail */
.thumb:hover {
  transform: scale(1.05);
}

/* Lightbox overlay */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
  z-index: 9999;
}

/* Full-screen clickable close layer */
.lightbox-close {
  position: absolute;
  inset: 0;
  cursor: zoom-out;
}

/* Lightbox image */
.lightbox img {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  margin: auto;
  display: block;
  top: 50%;
  transform: translateY(-50%) scale(.95);
  transition: transform .3s ease;
  pointer-events: none; /* allow click to pass to close layer */
}

/* Open state */
.lightbox:target {
  opacity: 1;
  pointer-events: auto;
}

.lightbox:target img {
  transform: translateY(-50%) scale(1);
}


.disc-heading{
  margin: 0;
  padding: 0;
}


.album-rating-wrap{
  display: flex;
  gap: 20px;
}

.rating-box .title {
  font-weight: 500;
  text-align: center;
  line-height: 1.3;
  font-size: 60%;
  padding: 0 5px;
}

.rating-box {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  flex-direction: column;
}

.rating-box .value{
  font-size: 150%;
  font-weight: 700;
  padding: 0 5px;
  border-left: 1px solid #ccc;
  line-height: 1.2;
}






.score-cell {
    position: relative;
    width: 100px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    font-weight: 600;
    border-radius: 6px;
    color: #fff;
    overflow: hidden;
    padding: 5px 20px;
}

/* gradient fill based on percentage */
.score-cell::before {
    content: '';
    position: absolute;
    inset: 0;
    width: var(--score);
    background: rgba(255, 255, 255, 0.25);
    z-index: 0;
}

.score-cell {
    z-index: 1;
}

/* Gradation colors */
.score-excellent {
    background-color: #2ecc71; /* green */
}

.score-good {
    background-color: #27ae60; /* darker green */
}

.score-average {
    background-color: #f1c40f; /* yellow */
    color: #000;
}

.score-poor {
    background-color: #e67e22; /* orange */
}

.score-bad {
    background-color: #e74c3c; /* red */
}

.score-na {
    background-color: rgba(1, 1, 1, 0.3);
}

.score-cell::before {
    transition: width 0.6s ease;
}

.ui-tooltip {
    background: #111;
    color: #fff;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,.25);
    position: absolute;
}

.track-row.liked{
  background: rgba(29, 185, 84, 0.3);
}

.track-row.liked:hover{
  background: rgba(29, 185, 84, 0.25);
  /*background: rgba(204, 204, 204, 0.5);*/
}

.track-row.disliked{
  background: rgba(220, 53, 69, 0.3);
}

.track-row.disliked:hover{
  background: rgba(220, 53, 69, 0.25);
  /*background: rgba(204, 204, 204, 0.5);*/
}

.track-row.neutraled{
  background: rgba(0, 0, 0, 0.1);
}

.track-row.neutraled:hover{
  background: rgba(0, 0, 0, 0.05);
  /*background: rgba(204, 204, 204, 0.5);*/
}

.ui-helper-hidden-accessible{
    display:none;
}

body{
  width: 100%;
  transition: width 0.5s ease;
}

body.spotify-preview-active{
  width: 67%;
}


/*
------------------------ */

.album-widget-grid {
    display: grid;
    grid-template-columns: repeat(var(--album-widget-cols), 1fr);
    gap: 16px;
}

.album-widget-item {
    display: block;
    text-decoration: none;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.35);
    border-radius: 12px;
}

.album-widget-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    overflow: hidden;
}

.album-widget-overlay-1 {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 16px;
    transition: opacity 0.25s ease;
}

.album-widget-overlay-4box {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between; /* left/right */
    align-content: space-between;   /* top/bottom */
    width: 100%;
    height: 100%; /* important so vertical spacing works */
    position: absolute;
    left: 0;
    top: 0;
    opacity: 1;
}

.album-widget-overlay-4box .box {
    flex: 0 0 50%; /* 2 per row */
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    padding: 5px;
}

.album-widget-overlay-4box:hover{
  opacity: 0;
}

.album-widget-overlay-4box .rating-spotify{
    display: inline-flex;
    flex-wrap: nowrap;
    flex-direction: row;
    justify-content: flex-end;
}

.album-widget-overlay-4box .rating-spotify .value{
  background-image: url("images/spotify-icon-64.png");
  background-size: 26px;
  padding-left: 20px;
  background-repeat: no-repeat;
  background-position: left center;
}

.album-widget-overlay-4box .rating-personal{
    display: inline-flex;
    flex-wrap: nowrap;
    flex-direction: row;
    justify-content: flex-start;
}

.album-widget-overlay-4box .rating-box .value{
    font-size: 100%;
    width: 50px;
    height: 25px;
    line-height: 1.3;
    box-shadow: -3px 0 8px rgba(0, 0, 0, 0.35);
}

.album-widget-overlay-4box .info{
  box-shadow: -3px 0 8px rgba(0, 0, 0, 0.35);
  background: rgba(0, 0, 0, 0.55);
  padding: 1px 5px;
  font-weight: 600;
  color: #fff;
}

.album-widget-overlay-4box .box{
  flex-direction: column;
}

.album-widget-overlay-4box .box-1,
.album-widget-overlay-4box .box-3,
.album-widget-overlay-4box .box-5{
  justify-content: flex-start;
  align-items: flex-start;
}

.album-widget-overlay-4box .box-2,
.album-widget-overlay-4box .box-4,
.album-widget-overlay-4box .box-6{
  justify-content: flex-end;
  align-items: flex-end;
}

.album-widget-overlay-4box .info,
.album-widget-overlay-4box .info .spotify-trend{
  font-size: 12px;
}

.album-widget-title {
    color: #fff;
    font-size: 1rem;
    line-height: 1.3;
}

.album-widget-item:hover .album-widget-overlay-1 {
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .album-widget-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .album-widget-grid {
        grid-template-columns: 1fr;
    }
}

.album-widget-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.album-widget-load-more {
    margin: 24px auto 0;
    display: block;
    padding: 10px 24px;
    border-radius: 999px;
    border: none;
    background: #111;
    color: #fff;
    cursor: pointer;
}

.album-widget-load-more:disabled {
    opacity: 0.6;
    cursor: default;
}


.spotify-chart-wrap {
    position: relative;
    height: 260px; /* 👈 fixed height */
    width: 100%;
}


@media (max-width: 768px) {
    .spotify-chart-wrap {
        height: 200px;
    }
}


.spotify-trend {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 14px;
}

.spotify-trend-wrap{
  box-shadow: -3px 0 8px rgba(0, 0, 0, 0.35);
  background: rgba(0, 0, 0, 0.65);
  padding: 1px 5px;
}

.spotify-trend-wrap .spotify-trend{
  justify-content: space-between;
  gap: 1px;
  font-size: 12px;
}

.spotify-trend--up {
    color: #1db954; /* Spotify green */
}

.spotify-trend--down {
    color: #e53935;
}

.spotify-trend--flat {
    color: #9e9e9e;
}

/* Vote Buttons */
.track-vote {
    display: inline-flex;
    gap: 6px;
}

.vote-option {
    cursor: pointer;
}

.vote-option input {
    display: none;
}

.vote-ui {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 36px;
    padding: 0 12px;
    border-radius: 6px;
    background: #f4f4f4;
    border: 1px solid #d0d0d0;
    font-size: 16px;
    transition:
        background 0.2s ease,
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

/* hover */
.vote-option:hover .vote-ui {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,.12);
}

/* active states */
.vote-option.active .vote-ui {
    color: #fff;
    border-color: transparent;
    transform: scale(1.05);
}

.vote-option.dislike.active .vote-ui {
    background: #e74c3c;
}

.vote-option.neutral.active .vote-ui {
    background: #7f8c8d;
}

.vote-option.like.active .vote-ui {
    background: #2ecc71;
}

