/* ============================================
   OutfitTor - Stylesheet
   ============================================ */

/* --- Base --- */
body {
    background: #fff;
}

/* --- Responsive Container --- */
.container {
    padding-left: 15px;
    padding-right: 15px;
}
@media (min-width: 768px) { .container { max-width: 720px; } }
@media (min-width: 992px) { .container { max-width: 960px; } }
@media (min-width: 1200px) { .container { max-width: 1140px; } }

/* --- Header: Logo + Nav --- */
.site-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 15px;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}
.header-logo {
    flex-shrink: 0;
}
.header-logo img {
    height: 65px;
    display: block;
}
.header-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: flex-start;
}
.header-nav .btn {
    padding: 6px 14px;
    font-size: 0.95em;
}
.header-nav .btn.active-view {
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.4);
}
@media (max-width: 576px) {
    .site-header {
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
        padding: 8px 10px;
    }
    .header-logo img {
        height: 40px;
    }
    .header-nav {
        width: 100%;
        justify-content: center;
    }
    .header-nav .btn {
        font-size: 0.8em;
        padding: 4px 8px;
    }
}

/* --- Language Flags (Footer) --- */
.lang-flag {
    font-size: 1.4em;
    text-decoration: none;
    opacity: 0.4;
    transition: opacity 0.2s;
    line-height: 1;
}
.lang-flag:hover {
    opacity: 0.8;
}
.lang-flag.active-lang {
    opacity: 1;
}
.footer-lang {
    display: inline-flex;
    gap: 8px;
    margin-top: 8px;
}

/* --- Onboarding Overlay --- */
.onboarding-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
}
.onboarding-box {
    background: #fff;
    border-radius: 12px;
    padding: 30px 25px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    border: 2px solid #007bff;
}
.onboarding-box h2 {
    color: #007bff;
    margin-bottom: 15px;
}
.onboarding-box p {
    margin-bottom: 10px;
    color: #333;
}
.onboarding-box .swipe-hint {
    color: #666;
    font-size: 0.9em;
    font-style: italic;
}
.onboarding-box .btn-start {
    background: #007bff;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1.1em;
    cursor: pointer;
    margin-top: 15px;
}
.onboarding-box .btn-start:hover {
    background: #0056b3;
}

/* --- Progress Bar --- */
.vote-progress-container {
    max-width: 500px;
    margin: 0 auto 15px;
    padding: 10px 15px;
}
.vote-progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    font-size: 0.95em;
    flex-wrap: wrap;
    gap: 5px;
}
.vote-count {
    font-weight: bold;
    color: #007bff;
}
.progress-hint {
    color: #666;
    font-size: 0.85em;
}
.progress-hint.progress-ready a {
    color: #28a745;
    font-weight: bold;
    text-decoration: none;
}
.progress-bar-track {
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: #007bff;
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* --- Voting Section --- */
.voting-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 15px;
}
.outfit-pair {
    display: flex;
    gap: 15px;
    justify-content: center;
    transition: opacity 0.3s ease;
    min-height: 200px;
}
.outfit-pair.loading {
    opacity: 0.3;
}
.outfit-card {
    flex: 1;
    max-width: 400px;
    cursor: pointer;
    text-align: center;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.2s, transform 0.2s;
}
.outfit-card:hover {
    border-color: #007bff;
    transform: scale(1.02);
}
.outfit-card.selected {
    border-color: #28a745;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(40, 167, 69, 0.3);
}
.outfit-vote-img {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
    display: block;
}
.outfit-info {
    padding: 8px;
    font-size: 0.85em;
    color: #666;
}
.btn-skip {
    background: #6c757d;
    color: #fff;
    border: none;
    padding: 8px 25px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.95em;
    margin-top: 15px;
}
.btn-skip:hover {
    background: #5a6268;
}
@media (max-width: 576px) {
    .outfit-pair { gap: 8px; }
    .outfit-info { font-size: 0.75em; padding: 5px; }
    .outfit-card { border-radius: 6px; }
}

/* --- Top Outfit Cards --- */
.top-outfit-card {
    margin: 20px auto;
    max-width: 600px;
    padding: 20px;
    border: 1px solid #007bff;
    border-radius: 8px;
    background: #fff;
}
.top-outfit-number {
    color: #007bff;
    font-size: 1.2em;
    font-weight: bold;
}

/* --- Recommend: Stil-Profil (aufklappbar) --- */
.recommend-profile {
    max-width: 1100px;
    margin: 0 auto 20px;
    padding: 0 15px;
}
.recommend-profile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 0.9em;
    color: #666;
    transition: background 0.2s, color 0.2s;
}
.recommend-profile-toggle:hover {
    background: #e9ecef;
    color: #333;
}
.recommend-profile-toggle .toggle-arrow {
    font-size: 0.8em;
    transition: transform 0.3s;
}
.recommend-profile-toggle.open .toggle-arrow {
    transform: rotate(180deg);
}
.recommend-profile-toggle.open {
    border-radius: 8px 8px 0 0;
    border-bottom: none;
    background: #e9ecef;
    color: #333;
}
.recommend-profile-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 8px 8px;
}
.recommend-profile-content:not(.show) {
    border-color: transparent;
}
.recommend-profile-content.show {
    max-height: 600px;
    overflow-y: auto;
    padding: 15px;
}
.recommend-profile-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}
.recommend-profile-card {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px 15px;
    min-width: 160px;
    flex: 1 1 auto;
    max-width: 280px;
}
.recommend-profile-card-header {
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #dee2e6;
    font-size: 0.95em;
}
.recommend-profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}
.recommend-tag {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
}
.recommend-tag-like {
    background: #e7f1ff;
    color: #0275d8;
    border: 1px solid #b8d4f0;
}
.recommend-tag-dislike {
    background: #fde8e8;
    color: #d9534f;
    border: 1px solid #f0b8b8;
    text-decoration: line-through;
}

/* --- Recommend: Outfit-Grid --- */
.recommend-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
}
@media (min-width: 768px) {
    .recommend-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1100px) {
    .recommend-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 400px) {
    .recommend-grid { grid-template-columns: 1fr; }
}
.recommend-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}
.recommend-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}
.recommend-card img {
    width: 100%;
    height: auto;
    display: block;
}
.recommend-card-footer {
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85em;
}
.recommend-card-rank {
    font-weight: bold;
    color: #007bff;
}

/* --- Infinite Scroll Sentinel --- */
.recommend-sentinel {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
}

/* --- Last 10 Section --- */
.last-vote-pair {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 0 auto;
    padding: 10px 15px;
    max-width: 700px;
    border-bottom: 1px solid #eee;
}
.last-vote-item {
    flex: 1;
    max-width: 280px;
    text-align: center;
}
.last-vote-item h4 {
    margin-bottom: 4px;
    font-size: 0.95em;
}
.last-vote-item img {
    max-height: 30vh;
    width: auto;
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}
.last-vote-item figcaption {
    margin-top: 4px;
    font-size: 0.75em;
    color: #666;
}
@media (max-width: 576px) {
    .last-vote-pair { gap: 8px; padding: 8px 10px; }
    .last-vote-item h4 { font-size: 0.85em; }
    .last-vote-item img { max-height: 25vh; }
}

/* --- Config Section: Side-by-Side Layout --- */
.config-layout {
    display: flex;
    gap: 25px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}
.config-sidebar {
    flex: 0 0 340px;
    position: sticky;
    top: 10px;
    align-self: flex-start;
    max-height: calc(100vh - 30px);
    overflow-y: auto;
}
.config-main {
    flex: 1;
    min-width: 0;
}
.config-filter-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.config-sticky-tags {
    background: #fff;
    padding: 10px 0;
    margin-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}
.btn-reset-sm {
    padding: 6px 15px;
    font-size: 0.85em;
    margin-top: 8px;
}
@media (max-width: 768px) {
    .config-layout {
        flex-direction: column;
    }
    .config-sidebar {
        flex: none;
        position: static;
        max-height: none;
    }
}

.config-filter-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}
@media (min-width: 576px) {
    .config-filter-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 992px) {
    .config-filter-grid { grid-template-columns: repeat(3, 1fr); }
}

.filter-category-container {
    margin: 10px 0;
}

.config-checkbox-label {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border: 2px solid #dee2e6;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}
.config-checkbox-label:hover {
    border-color: #007bff;
    background: #f8f9fa;
}
.config-checkbox-label input[type="checkbox"] { margin-right: 6px; }
.config-checkbox-label input[type="checkbox"]:checked + span { font-weight: bold; color: #007bff; }
.config-checkbox-label input[type="checkbox"]:checked { accent-color: #007bff; }
.config-checkbox-label.is-checked {
    border-color: #007bff;
    background: #e7f1ff;
}

.collapsible-header {
    background: #007bff;
    color: #fff;
    padding: 12px 20px;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    user-select: none;
}
.collapsible-header:hover { background: #0056b3; }
.collapsible-header .toggle-arrow { transition: transform 0.3s; }
.collapsible-header.active .toggle-arrow { transform: rotate(180deg); }
.collapsible-header.primary-category { background: #28a745; font-size: 1.1em; }
.collapsible-header.primary-category:hover { background: #1e7e34; }

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}
.collapsible-content.show {
    max-height: 500px;
    overflow-y: auto;
}

.filter-badge {
    background: #fff;
    color: #007bff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85em;
    font-weight: bold;
    margin-left: 10px;
}
.primary-category .filter-badge { color: #28a745; }

.sticky-filter-header {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 100;
    padding: 15px 0;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 20px;
}
.filter-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.filter-tag {
    display: inline-flex;
    align-items: center;
    background: #007bff;
    color: #fff;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.9em;
}
.filter-tag .remove-tag {
    margin-left: 8px;
    cursor: pointer;
    font-weight: bold;
}
.filter-tag .remove-tag:hover { color: #ffcccc; }

.result-counter {
    background: #28a745;
    color: #fff;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    display: inline-block;
    margin: 15px 0;
}
.result-counter.no-results { background: #dc3545; }

.btn-reset {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1em;
}
.btn-reset:hover { background: #c82333; }

.btn-load-more {
    background: #007bff;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1em;
    margin: 20px 0;
}
.btn-load-more:hover { background: #0056b3; }

.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    margin: 20px 0;
}
@media (min-width: 768px) {
    .config-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

/* --- Single Outfit View --- */
.single-outfit-container {
    display: flex;
    gap: 30px;
    padding: 20px 15px;
    max-width: 1100px;
    margin: 0 auto;
}
.single-outfit-image {
    flex: 1;
    text-align: center;
}
.single-outfit-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}
.single-outfit-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
@media (max-width: 768px) {
    .single-outfit-container { flex-direction: column; }
}

/* Outfit Attribute Cards */
.outfit-attr-card {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-left: 4px solid #007bff;
    border-radius: 6px;
    padding: 15px;
}
.outfit-attr-card-header {
    font-size: 1.1em;
    font-weight: bold;
    color: #007bff;
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid #dee2e6;
}
.outfit-attr-list {
    margin-bottom: 10px;
}
.outfit-attr-row {
    display: flex;
    padding: 3px 0;
    font-size: 0.95em;
}
.outfit-attr-label {
    color: #666;
    min-width: 110px;
    flex-shrink: 0;
}
.outfit-attr-label::after {
    content: ":";
}
.outfit-attr-value {
    font-weight: 500;
    color: #333;
}
.outfit-shop-links {
    padding-top: 8px;
    border-top: 1px solid #dee2e6;
    font-size: 0.9em;
}
.outfit-shop-links a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}
.outfit-shop-links a:hover {
    text-decoration: underline;
}

/* --- Outfit Detail Navigation --- */
.outfit-detail-wrapper {
    position: relative;
}
.outfit-nav-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 123, 255, 0.15);
    color: #007bff;
    border: 1px solid #007bff;
    width: 44px;
    height: 70px;
    font-size: 1.8em;
    cursor: pointer;
    z-index: 50;
    border-radius: 6px;
    display: none;
    transition: background 0.2s;
    line-height: 1;
    padding: 0;
}
.outfit-nav-arrow:hover {
    background: rgba(0, 123, 255, 0.9);
    color: #fff;
}
.outfit-nav-left {
    left: 10px;
}
.outfit-nav-right {
    right: 10px;
}
.outfit-position {
    display: inline-block;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #666;
    padding: 4px 14px;
    border-radius: 15px;
    font-size: 0.85em;
    margin-bottom: 10px;
}
/* Bild-Transition beim Navigieren */
#outfitMainImg {
    transition: opacity 0.25s ease;
}
@media (max-width: 768px) {
    .outfit-nav-arrow {
        width: 36px;
        height: 56px;
        font-size: 1.4em;
    }
    .outfit-nav-left { left: 5px; }
    .outfit-nav-right { right: 5px; }
}

/* --- Responsive Image --- */
.responsive-outfit-img {
    width: 100%;
    max-width: 500px;
    height: auto;
}
@media (min-width: 768px) { .responsive-outfit-img { width: 50%; } }
@media (min-width: 1200px) { .responsive-outfit-img { width: 40%; } }

/* --- Footer --- */
footer.footer {
    margin-top: 40px;
}
footer.footer hr {
    border-color: #dee2e6;
}

/* --- Typography responsive --- */
@media (max-width: 576px) {
    body { font-size: 14px; }
    h1 { font-size: 1.75em; }
    h2 { font-size: 1.5em; }
}
