/* ========================================
   Set Card Styles
   ======================================== */

.set-card {
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    border: 1px solid var(--bs-border-color);
    overflow: hidden;
}

.set-card:hover {
    transform: var(--card-hover-transform);
    box-shadow: var(--card-hover-shadow);
}

.set-card__image {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--bs-tertiary-bg);
}

.set-card__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
}

.set-card__placeholder {
    width: 100%;
    aspect-ratio: 1 / 1;
}

.set-card .card-title {
    font-size: 0.95rem;
    line-height: 1.3;
}

.set-card .card-title a {
    color: var(--bs-body-color);
}

.set-card .card-title a:hover {
    color: var(--bs-primary);
}

.set-card__meta {
    font-size: 0.85rem;
}

.set-card__actions .btn {
    padding: 0.25rem 0.5rem;
}

/* Ensure action buttons are clickable above the stretched-link overlay */
.set-card .card-footer {
    position: relative;
    z-index: 1;
}

/* ========================================
   Theme Card Styles
   ======================================== */

/* Base Theme Card Styles */
.theme-card {
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    border: 1px solid var(--bs-border-color);
    overflow: hidden;
}

.theme-card:hover {
    transform: var(--card-hover-transform);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.theme-card__visual {
    display: none; /* Hidden by default, shown per variant */
}

.theme-card__title a {
    color: var(--bs-body-color);
    text-decoration: none;
}

.theme-card__title a:hover {
    color: var(--bs-primary);
}

.theme-card__title .badge {
    font-size: 0.7rem;
    font-weight: 500;
    vertical-align: middle;
}

.theme-card__description {
    font-size: 0.9rem;
    color: var(--bs-secondary-color);
    line-height: 1.5;
}

.theme-card__subthemes {
    font-size: 0.85rem;
}

.theme-card__subtheme-item {
    padding: 0.2rem 0;
    border-bottom: 1px solid var(--bs-border-color-translucent);
}

.theme-card__subtheme-item:last-child {
    border-bottom: none;
}

.theme-card__subtheme-item a {
    color: var(--bs-body-color);
}

.theme-card__subtheme-item a:hover {
    color: var(--bs-primary);
}

/* ----------------------------------------
   Variant F: Icon with color bar combo
   ---------------------------------------- */
[data-theme-variant="F"] .theme-card__visual {
    display: flex;
    flex-direction: column;
    height: auto;
}

[data-theme-variant="F"] .theme-card__color-bar {
    display: block;
    height: 4px;
    width: 100%;
}

[data-theme-variant="F"] .theme-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 70px;
    background: var(--bs-tertiary-bg);
}

[data-theme-variant="F"] .theme-icon {
    width: 40px;
    height: 40px;
    opacity: 0.5;
    transition: transform var(--transition-normal), opacity var(--transition-normal);
}

[data-theme-variant="F"] .theme-card:hover .theme-icon {
    opacity: 0.8;
    transform: scale(1.1);
}

/* Color bar gradients rotating through 6 colors */
[data-theme-variant="F"] .theme-cards .col:nth-child(6n+1) .theme-card__color-bar {
    background: linear-gradient(90deg, #dc3545, #ff6b7a);
}
[data-theme-variant="F"] .theme-cards .col:nth-child(6n+2) .theme-card__color-bar {
    background: linear-gradient(90deg, #fd7e14, #ffb366);
}
[data-theme-variant="F"] .theme-cards .col:nth-child(6n+3) .theme-card__color-bar {
    background: linear-gradient(90deg, #28a745, #5dd879);
}
[data-theme-variant="F"] .theme-cards .col:nth-child(6n+4) .theme-card__color-bar {
    background: linear-gradient(90deg, #007bff, #66b3ff);
}
[data-theme-variant="F"] .theme-cards .col:nth-child(6n+5) .theme-card__color-bar {
    background: linear-gradient(90deg, #6f42c1, #a78bfa);
}
[data-theme-variant="F"] .theme-cards .col:nth-child(6n+6) .theme-card__color-bar {
    background: linear-gradient(90deg, #17a2b8, #5cd3e8);
}

/* Icon color matches bar color */
[data-theme-variant="F"] .theme-cards .col:nth-child(6n+1) .theme-icon {
    color: #dc3545;
}
[data-theme-variant="F"] .theme-cards .col:nth-child(6n+2) .theme-icon {
    color: #fd7e14;
}
[data-theme-variant="F"] .theme-cards .col:nth-child(6n+3) .theme-icon {
    color: #28a745;
}
[data-theme-variant="F"] .theme-cards .col:nth-child(6n+4) .theme-icon {
    color: #007bff;
}
[data-theme-variant="F"] .theme-cards .col:nth-child(6n+5) .theme-icon {
    color: #6f42c1;
}
[data-theme-variant="F"] .theme-cards .col:nth-child(6n+6) .theme-icon {
    color: #17a2b8;
}

/* ----------------------------------------
   Variant Switcher (Debug Mode)
   ---------------------------------------- */
.variant-switcher {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 1050;
    background: var(--bs-body-bg);
    padding: 0.75rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--bs-border-color);
}

.variant-switcher .btn.active {
    background: var(--bs-primary);
    border-color: var(--bs-primary);
    color: white;
}

/* Avoid overlap with cookie banner */
.cookie-consent-visible .variant-switcher {
    bottom: 8rem;
}
