@import url('../vendor/fonts/lato-1sd5i.css');

input {
  padding: 6px;
  font-family: inherit;
  font-size: 16px;
  border: 1px solid gainsboro;
  border-radius: 4px;
  -webkit-appearance: none;
}

.album {
  position: relative;
  overflow: hidden;
  margin: 12px auto;
  width: 100%;
  max-width: 800px;
  background-color: white;
}

.album__data {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 400px;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
    ;
}

.album__search {
  position: absolute;
  top: 24px;
  right: 24px;
  width: calc(100% - 48px);
  max-width: 420px;
  z-index: 10;
}


    .album__search-results div.active {
        background: #cfe2ff; /* soft blue like Phoenix theme */
        color: var(--c-accent-primary); /* optional: change text color on hover */
        transition: background 0.3s ease, color 0.3s ease;
    }

.album__search-results div {
  padding: 8px 12px;
  font-size: .8rem;
  cursor: pointer;
  border-bottom: 1px dotted #eee;
  font-family: Arial;
  letter-spacing: .02rem;
}

.album__search-results div:last-child {
  border-bottom: none;
}

    .album__search-results div:hover {
        background: #cfe2ff; /* soft blue like Phoenix theme */
        color: var(--c-accent-primary); /* optional: change text color on hover */
        transition: background 0.3s ease, color 0.3s ease;
    }


.album__poster {
  position: relative;
  display: flex;
  width: 100%;
}

.album__poster--fill {
  position: absolute;
  overflow: hidden;
  bottom: -20%;
  left: -30%;
  width: 150%;
  height: 150%;
}

.album__poster--fill img {
  filter: blur(6px);
  object-fit: cover;
  width: 100%;
  height: 100%;
  transform: scale(1.4);
}

.album__poster--featured {
    position: relative;
    align-self: flex-start;
    margin-left: 100px;
    margin-top: 60px;
    width: 140px;
    background-color: gainsboro;
    border-radius: 2px;
    box-shadow: rgba(0, 0, 0, 0.6) 0 6px 12px -6px;
    z-index: 1;
    width: 140px;
    vertical-align: middle;
    border: 2px solid whitesmoke;
    transition: transform 0.4s ease;
}

.album__poster--featured img {
  width: 170px !important;
  vertical-align: middle;
  border: 2px solid whitesmoke;
}

.album-featured-img {
    width: 140px !important;
    height: auto;
    max-width: unset;
    max-height: unset;
    display: block;
}

.album__poster--fill img {
    width: 100% !important;
    height: 100% !important;
}


.album__details {
  flex: 1;
  margin-left: 100px;
  padding-right: 10px;
  padding-top: 40px;
  padding-bottom: 20px;
}

.album__title {
  font-family: 'Lato', sans-serif;
  font-size: 2em;
  margin-bottom: 12px;
  margin-top: 12px;
}

.album__artist {
  font-size: 1em;
  margin-bottom: 12px;
}

.album__release {
  font-size: 0.9em;
  color: gray;
}

.album__no-results {
  text-align: center;
  width: 100%;
  margin-top: 50px;
  font-size: 1.2em;
  color: darkgray;
}

@media (min-width: 600px) {
  .album__data {
    flex-direction: row;
  }

  .album__poster {
    width: 200px;
    margin-right: 12px;
  }
}
.album__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: 12px;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease, transform 0.2s ease;
    align-items: center;
    color: var(--c-accent-primary, #404089);
}

    .album__link:hover {
        color: #686b87;
    }

.album__links-wrapper {
    display: flex;
    align-items: center;
    margin-top: 16px;
}

/* Divider between Spotify and Add to Queue */
.album__divider {
    width: 1px;
    height: 24px;
    background: #ccc;
    margin-right: 10px;
    opacity: 0.5;
}


    .album__poster--featured img:hover {
        transform: scale(1.05);
    }

/* When typing, input background brightens */
.album__search-bar input:focus {
    background: #fdfcff;
}

}

.album__player {
    margin-top: 24px;
}

.album__label, .album__tracks {
    font-size: .7rem;
    margin-top: 4px;
}

.album__search-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    background: #f2f4f8;
    padding: 8px 12px;
    border-radius: 8px;
    width: 70%;
    max-width: 370px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 1rem;
    margin-left: auto; /* aligns right */
}

    .album__search-bar input[type="search"] {
        flex-grow: 1;
        font-size: 1rem;
        padding: 8px 12px;
        border: 1px solid #ccc;
        border-radius: 6px;
        background: white;
        color: #333;
        transition: border-color 0.2s ease;
    }

        .album__search-bar input[type="search"]:focus {
            border-color: #404089;
            background: #fffefc;
            outline: none;
        }

    .album__search-bar button {
        background: none;
        border: none;
        padding: 0;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }

        .album__search-bar button.search-btn img {
            width: 22px;
            height: 22px;
        }

    .album__search-bar .search-btn:hover img {
        transform: scale(1.1) rotate(10deg);
        transition: transform 0.2s ease, filter 0.2s ease;
        filter: brightness(0) saturate(100%) invert(64%) sepia(44%) saturate(530%) hue-rotate(124deg);
    }


    .album__search-bar .refresh-btn {
        margin-left: 4px;
    }

        .album__search-bar .refresh-btn .material-icons {
            font-size: 22px;
            color: #555;
            transition: transform 0.2s ease, color 0.2s ease;
        }

        .album__search-bar .refresh-btn:hover .material-icons {
            color: #222;
            transform: rotate(-95deg) scale(1.1);
            filter: brightness(0) saturate(100%) invert(64%) sepia(44%) saturate(530%) hue-rotate(124deg);
        }

.album__data.show {
  visibility: visible;
  opacity: 1;
}
.album__search-results {
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

    .album__search-results.active {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .album__search-results div:hover {
        background: #eef5ff;
        color: #404089;
    }

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #ccc;
    border-top: 2px solid #404089;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.album__shimmer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: white;
    border-radius: 0.8em;
    z-index: 2;
    opacity: 1;
    transition: opacity 0.4s ease;
    width: 100%;
}
    .album__shimmer.fade-out {
        opacity: 0;
        pointer-events: none;
    }


.album__shimmer-poster {
    width: 400px;
    height: 400px;
    margin: 2rem;
}


@keyframes shimmerPulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 0.8;
    }
}


.album__shimmer-details {
  flex: 1;
}
.album__shimmer-line {
  height: 16px;
  background: #f0f0f0;
  margin-bottom: 12px;
  border-radius: 4px;
  animation: shimmer 1.2s infinite linear;
}
.album__shimmer-line.short {
  width: 50%;
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Pop animation for album cover */
@keyframes pop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }

    100% {
        transform: scale(1);
    }
}

.pop {
    animation: pop 0.3s ease forwards;
}

.album__link {
    color: #2b988f !important;
}

.album__actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    margin-top: 16px;
}

    .album__actions a {
        display: flex;
        align-items: center;
        font-weight: bold;
        font-size: 0.9rem;
        text-decoration: none;
        color: #2b988f !important;
        padding: 8px 12px;
        border-radius: 6px;
        transition: background 0.2s;
    }



.album__tracks-list {
    padding-left: 0rem;
    font-size: 0.75rem;
    list-style: none;
}

    .album__tracks-list li {
        line-height: 1.8;
    }


.album__tags {
    margin-top: 1rem;
}

.album__tag {
    display: inline-block;
    background: #eef5ff;
    color: #404089;
}

.album__wiki-text-container {
    position: relative;
    max-height: 80px;
    overflow: hidden;
    transition: max-height 0.4s ease;
    font-size: .75rem;
    line-height: 1.2rem;
}

.album__wiki-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1));
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.album__wiki-toggle {
    display: block;
    margin: 12px auto 0 auto; /* center horizontally */
    background: none;
    border: none;
    color: #2b988f;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 4px 8px;
    text-align: center;
}


.album__wiki-text-container.expanded {
    max-height: none;
}

    .album__wiki-text-container.expanded .album__wiki-fade {
        opacity: 0;
    }

.album__meta {
    display: flex;
    align-items: baseline;
    gap: 6px;
    color: #666;
    flex-wrap: wrap;
    margin-bottom: 8px;
    font-size: .8rem;
}


.album__divider-dot {
    margin: 0 3px;
    color: #999;
    font-size: 1.2rem;
    opacity: .2;
}



/* ==============================
   CREATE GROUP ALBUM PICKER
============================== */

.cg-album-picker .cg-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-top: 6px;
    z-index: 1000;
    box-shadow: 0 8px 18px rgba(0,0,0,0.08);
    max-height: 260px;
    overflow-y: auto;
}

    .cg-album-picker .cg-search-results div {
        padding: 8px 12px;
        cursor: pointer;
    }

        .cg-album-picker .cg-search-results div:hover {
            background: #f5f7f9;
        }

.cg-album-result {
    display: flex;
    gap: 16px;
    margin-top: 18px;
}

.cg-cover {
    width: 160px;
    border-radius: 12px;
    box-shadow: 0 8px 18px rgba(0,0,0,0.1);
}

.cg-meta h4 {
    margin: 0 0 6px 0;
    font-weight: 700;
}

.cg-summary {
    margin-top: 10px;
    color: #555;
    font-size: 0.9rem;
}
