/* styles.css */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    background-color: #f5f5f5;
    color: #333;
    margin: 0 auto;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.header-right {
    display: flex;
    align-items: center;
    margin-left: auto;
    gap: 10px
}

#collection-title {
    font-size: 2rem;
}

header h1 {
    color: #2c3e50;
}

header a {
    color: #3498db;
    text-decoration: none;
}

header a:hover {
    text-decoration: underline;
}

.title-author-container {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

/* Styles for the highlight feature - add to styles.css */

/* Main highlight container */
/* Add only these missing styles for the background loading indicator */
.background-loading-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 8px 15px;
    z-index: 1000;
    transition: opacity 0.3s;
}

.background-loading-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 800px;
    margin: 0 auto;
}

.background-loading-content p {
    margin: 0;
    font-size: 0.9rem;
    color: white;
}

.progress-bar {
    height: 10px;
    width: 200px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background-color: rgba(0, 163, 255, 0.8);
    transition: width 0.3s;
}

/* Additional responsive adjustment for the background loading indicator */
@media (max-width: 768px) {
    .background-loading-content {
        flex-direction: column;
        gap: 5px;
    }
    
    .progress-bar {
        width: 100%;
    }
}

.highlight-container {
    display: grid;
    grid-template-columns: 60% 40%;
    gap: 10px;
    max-width: 900px;
    margin: auto;
    background-color: #fff;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Left panel - main artwork and info */
.highlight-left-panel {
    display: flex;
    flex-direction: column;
}

.highlight-left-panel .media-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
	border-radius: 0px;
}

/*.highlight-main-image {
    max-width: 100%;
    max-height: 500px;
    display: block;
}*/

.highlight-metadata {
    padding: 10px;
}

.highlight-metadata h2 {
    margin: 0 0 5px 0;
    font-size: 1.8rem;
}

.highlight-metadata h3 {
    margin: 0 0 15px 0;
    font-size: 1.2rem;
    opacity: 0.8;
}

.highlight-token-name {
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.highlight-description {
    margin-bottom: 20px;
    overflow-y: auto;
    padding-right: 10px;
    line-height: 1.5;
}

.highlight-links {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.highlight-button {
    padding: 8px 15px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    text-decoration: none;
    color: white;
    font-weight: bold;
    transition: background-color 0.2s;
}

.highlight-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Right panel - thumbnails */
.highlight-right-panel {
    display: flex;
    flex-direction: column;
	padding-right:15px;
}

.highlight-right-panel h2 {
    font-size: 1.3rem;
	line-height: 1.2rem;
	margin-bottom: 10px;
}

.highlight-right-panel h3 {
    margin: 0 0 5px 0;
    font-size: 1rem;
	line-height:1.2rem;
}

.highlight-right-panel h4 {
    margin: 0;
    font-size: 0.75rem;
}

.highlight-right-panel em{
	font-style: italic;
	color: #A50021;
}

.highlight-right-panel a {
	text-decoration: none;
	color:inherit;
}

.highlight-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 10px;
    overflow-y: auto;
    padding: 5px;
	padding-bottom:20px;
	margin-top:10px;
}

.highlight-thumbnail {
    position: relative;
    overflow: hidden;
    transition: transform 0.2s;
}

.highlight-thumbnail img, .highlight-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.highlight-thumbnail:hover {
    transform: scale(1.1);
    z-index: 1;
}

.highlight-thumbnail.active {
    box-shadow: 0 0 0 2px #fff;
}

.highlight-thumbnail.burnt {
    opacity: 0.4;
}

/* Token grid */
.home-grid {
    display: flex;
	flex-direction:column;
    gap: 20px;
    width: 80%;
    margin: 0 auto;
}

.link-info {
	display:grid;
	grid-template-columns:auto 1fr;
	gap:14px;
	padding:3px;
	border:1px solid #000;
	border-radius:3px;
	align-items: center;
}

.link-info img{
	grid-column:1;
	width:65px;
	height:65px;
	display:block;
	object-fit: contain;
}

.link-text {
	grid-column:2;
	display: flex;
    flex-direction: column;
    justify-content: center; /* Centers content vertically within this element */
}

/*
.highlight-thumbnail.burnt::after {
    content: "🔥";
	color:red;
    position: absolute;
    bottom: 2px;
    right: 2px;
    font-size: 10px;
    background-color: rgba(255, 0, 0, 0.7);
    border-radius: 50%;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}
*/

/* Disabled button state */
.filter-toggle-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}



/* Media queries for responsiveness */
@media (max-width: 768px) {
    .highlight-container {
        grid-template-columns: 1fr !important; /* Force single column regardless of inline styles */
        grid-template-rows: auto auto; /* Stack items vertically */
    }
    
    .highlight-left-panel, .highlight-right-panel {
        width: 100%;
		overflow:hidden;
    }
    
    .highlight-thumbnails {
        max-height: 300px;
    }
}

#collection-author {
    font-style: italic;
    color: #666;
}

/* Media query for mobile and low-resolution screens */
@media screen and (max-width: 600px) {
    header {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    #collection-title {
        margin-bottom: 5px;
    }

    #collection-author {
        order: 2;
        margin-top: 0;
        font-size: 1.5rem;
    }

    .header-right {
        justify-content: flex-start;
        width: 100%;
        margin-top: 10px;
    }

    .filter-toggle-button, #back-to-index {
        order: 3;
    }
}

/* Loading indicator */
.loading-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
}

.loading {
    background-color: #3498db;
	color:#fff;
    padding: 15px 20px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    pointer-events: auto;
}

/* Filter bar */
.filter-toggle-button {
    background-color: inherit;
    color: #000;
    border:  1px solid #000;
    padding: 8px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease-in-out;
    font-size: 0.9em;
}

.filter-toggle-button:hover {
    background-color: #2980b9;
	color:#ccc
}

.filter-bar {
    position: absolute;
    top: 100%;
	right:10px;
    width: 360px;
	max-width: 90%;
    background-color: #fff;
    padding: 15px;
	margin-top: 5px;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: none;
}

.filter-toggle-button.grayscale {
    filter: grayscale(100%);
    color: gray;
}

.filter-toggle-button.active {
    background-color: red;
    color: white;
}

/* Filter bar state */
.filter-bar.hidden {
    display: none;
}

.filter-bar.active { display: block; }

.filter-bar.show {
    display: flex;
	max-height: 500px;
	opacity:1;
}

.hidden {
    display: none;
}

.invisible {
    visibility: hidden;
}



.search-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex: 1;
}

.author-filter, .year-filter, .relationship-filters {
    display: flex;
    align-items: center;
    gap: 5px;
}

input[type="text"], select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

.clear-filters-btn {
    background-color: #F08080;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 5px 10px;
    margin-left: auto;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.clear-filters-btn:hover {
    background-color: #e41c38;
}

.created-date {
    font-size: 0.9em;
    color: #999;
}



/* Token grid */
.tokens-grid, #collectionsGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    width: 100%;
    margin: 0 auto;
	align-items:stretch;
}

.token {
    width: 100%;
	height:100%;
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: 0px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.token:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.token-image-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
	margin-bottom: 5px;
}

.token-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.token-link {
	height:100%;
    text-decoration: none;
    color: inherit;	
}

.token-info {
    padding: 1px;
	text-align:center;
	font-size:0.9em;
	margin-top:auto;
	display:flex;
	flex-direction:column;
	justify-content: center;
}

.token-info h3 {
    margin-bottom: 10px;
    color: #2c3e50;
	font-size: 1em;
	line-height: 1.3em;
	padding: 0 1px 0 1px;
}

.token-info p {
    color: #666;
	line-height:1.2em;
}

.token-id {
    font-size: 0.9em;
    color: #777;
}

.author-name {
	font-size: 0.9em;
	cursor:zoom-in;
}

.minted-date {
    font-size: 0.85em;
    color: #999;
}

.author-address {
    font-size: 0.85em;
    color: #666;
	cursor:grabbing;
}

.copy-popup {
    position: fixed;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    z-index: 1000;
    pointer-events: none;
    animation: fadeInOut 1s forwards;
}

@keyframes fadeOut {
    0% { opacity: 0; }
	30% { opacity: 1; }
    60% { opacity: 1; }
    100% { opacity: 0; }
}

/* Media container styles */
.media-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    background-color: inherit;
    border-radius: 8px;
    overflow: hidden;
    /* min-height: 400px; */
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-container img {
    max-width: 100%;
    max-height: 600px;
    display: block;
}

.text-content-frame {
    width: 100%;
    height: 400px;
    border: none;
    background-color: white;
}

/* Download container styles */
.download-container {
    text-align: center;
    padding: 20px;
}

.thumbnail-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #f5f5f5;
  width: 100%;
  height: 100%;
  min-height: 60px;
}

.media-icon {
  font-size: 24px;
  color: #555;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

.file-icon {
    margin-bottom: 15px;
}

.file-icon svg {
    width: 64px;
    height: 64px;
    fill: none;
    stroke: #555;
    stroke-width: 1;
}

.file-info {
    margin-bottom: 15px;
}

.file-info p {
    margin: 5px 0;
}

.file-type {
    color: #777;
    font-size: 0.9em;
}

.download-button {
    display: inline-block;
    padding: 8px 16px;
    background-color: #4a90e2;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
}

.download-button:hover {
    background-color: #3a80d2;
}

/* Style burnt tokens */
.burnt {
    position: relative;
    filter: grayscale(100%) brightness(0.7);
}

.burnt::after {
    content: "Burnt";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    font-size: 0.7em;
    font-weight: bold;
    border-radius: 5px;
}

/* Error messages */
.error-message {
    background-color: #ffebee;
    padding: 20px;
    border-radius: 5px;
    border-left: 4px solid #f44336;
    margin: 20px 0;
}

.no-results {
    text-align: center;
    margin: 50px 0;
    color: #666;
}

/* Lazy loading */
.lazy-image {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.lazy-image.loaded {
    opacity: 1;
}

.lazy-image.image-loading {
    background-color: #f0f0f0;
}


/* Style for the art token details page */
#art-token-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 800px;
    /*margin: 10px auto;*/
    padding: 10px;
}

#art-token-container a {
    text-decoration:none;
	color:#000;
}

#art-token-image {
    max-width: 100%;
    max-height: 500px;
}

#art-token-metadata {
    width: 100%;
    text-align: left;
    /*margin-top: 20px;*/
}

.art-metadata-box {
    width: 100%;
    max-width: 500px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    padding: 20px 0;
    text-align: left;
    /*margin-top: 10px;*/
}

/* Adjustments for mobile devices */
@media (max-width: 768px) {
    .art-metadata-box {
        padding: 15px;
        margin: 0 10px;
        max-width: none;
    }

    #art-token-container {
        padding: 15px;
    }
}

.art-attributes-box {
    width: 100%;
    text-align: left;
    margin-top: 20px;
}

ul {
    list-style-type: none;
    padding: 0;
}

h4 {
    margin: 15px 0 5px;
}

/* Style for the link container inside the metadata box */
.art-link-container {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    padding: 0 0 0 0;
	border-top: dotted 1px #666;
}

.art-link-container a {
    color: gray;
    text-transform: lowercase;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.art-link-container a:hover {
    color: black;
}

/* Card-like style for the art token */
.art-token {
    box-sizing: border-box;
    border: 2px solid transparent;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, border 0.2s ease;
}

.art-token:hover {
    transform: translateY(-3px);
    border: 2px solid #666;
}

.art-token img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.art-token-details {
    text-align: center;
}

#back-to-collection:hover {
    background-color: #ddd;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #art-token-container {
        padding: 15px;
    }

    .art-metadata-box {
        padding: 20px;
        max-width: none;
    }

    #art-token-image {
        max-width: 100%;
        height: auto;
    }
}

/* FOR THE COLLECTION SETS NAVIGATION */
/* Add to your styles.css */
.collection-set-nav {
    display: flex;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.collection-set-link {
    padding: 0.25rem 0.75rem;
    text-decoration: none;
    color: #333;
    border-radius: 4px;
    background-color: #f0f0f0;
    font-size: 0.9rem;
}

.collection-set-link.active {
    background-color: #007bff;
    color: white;
}