/* ==========================================================================
   SamMALsurium - Site Styles
   Mobile-first responsive design
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties (Design Tokens)
   -------------------------------------------------------------------------- */
:root {
    /* Colors */
    --primary: #B64D3F;
    --primary-dark: #400406;
    --primary-light: #E09990;
    --secondary: #00AFB5;
    --secondary-dark: #027A7E;
    --secondary-light: #93EBEE;
    --body-bg: #D9CFC1;
    --card-bg: #FAF6F1;
    --text-primary: #400406;
    --text-secondary: #212529;

    /* Typography */
    --font-body: 'Manrope', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-heading: 'Fraunces', serif;

    /* Spacing */
    --border-radius-card: 15px;
    --shadow-card: 4px 4px 12px rgba(0, 0, 0, 0.15);
}

/* --------------------------------------------------------------------------
   Base Styles
   -------------------------------------------------------------------------- */
html {
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--body-bg);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    /* Sticky footer layout */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
}

a {
    color: var(--primary);
}

a:hover {
    color: var(--primary-dark);
}

/* --------------------------------------------------------------------------
   Header Styles (Mobile-First)
   -------------------------------------------------------------------------- */
.site-header {
    background-color: var(--card-bg);
}

/* Logo Link */
.logo-link {
    display: block;
    text-decoration: none;
}

.logo-link:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Logo - Mobile (default) */
.site-logo {
    height: 40px;
    width: auto;
    min-width: 78px;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Header Actions (login buttons) */
.header-actions .btn {
    font-size: 12px;
    padding: 8px 12px;
}

/* --------------------------------------------------------------------------
   Tablet Styles (768px and up)
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
    /* Logo - Tablet */
    .site-logo {
        height: 80px;
    }

    /* Header Actions - Tablet */
    .header-actions .btn {
        font-size: 13px;
        padding: 8px 16px;
    }
}

/* --------------------------------------------------------------------------
   Desktop Styles (1200px and up)
   -------------------------------------------------------------------------- */
@media (min-width: 1200px) {
    /* Logo - Desktop */
    .site-logo {
        height: 120px;
    }

    /* Header Actions - Desktop */
    .header-actions .btn {
        font-size: 16px;
        padding: 12px 24px;
    }
}

/* --------------------------------------------------------------------------
   Navigation Bar Styles
   -------------------------------------------------------------------------- */
.nav-bar {
    background-color: var(--body-bg);
}

.nav-bar .btn-group .btn {
    font-size: 13px;
}

@media (min-width: 1200px) {
    .nav-bar .btn-group .btn {
        font-size: 16px;
    }
}

/* --------------------------------------------------------------------------
   Footer Styles
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
   Content Cards
   -------------------------------------------------------------------------- */
.content-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius-card);
    box-shadow: var(--shadow-card);
    min-height: 100px;
    padding: 20px;
}

@media (min-width: 768px) {
    .content-card {
        padding: 30px;
    }
}

@media (min-width: 1200px) {
    .content-card {
        padding: 40px;
    }
}

/* --------------------------------------------------------------------------
   Button Overrides (if Bootstrap variables not customized)
   -------------------------------------------------------------------------- */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
}

.btn-primary:active {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: scale(0.95);
}

.btn-outline-primary {
    border-color: var(--primary);
    color: var(--primary);
    border-width: 2px;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.btn-outline-primary:active {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: scale(0.95);
}

/* --------------------------------------------------------------------------
   Dropdown Menu Styles
   -------------------------------------------------------------------------- */
.dropdown-menu {
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: var(--shadow-card);
}

.dropdown-item {
    color: var(--text-primary);
    font-family: var(--font-body);
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: var(--primary);
    color: #fff;
}

.dropdown-item:active {
    background-color: var(--primary-dark);
    color: #fff;
}

/* --------------------------------------------------------------------------
   User Menu Button
   Match height with header action buttons (Anmelden/Registrieren)
   -------------------------------------------------------------------------- */
.user-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Match header action button padding: 8px 12px */
    padding: 8px 12px;
    /* Ensure button height matches text buttons by setting line-height */
    line-height: 1;
}

.user-menu-btn i {
    /* Size icon to fill the button reasonably */
    font-size: 1.5rem;
    line-height: 1;
}

@media (min-width: 768px) {
    .user-menu-btn {
        /* Match header action button padding: 8px 16px */
        padding: 8px 16px;
    }

    .user-menu-btn i {
        /* Size icon to fill the button reasonably */
        font-size: 1.5rem;
    }
}

@media (min-width: 1200px) {
    .user-menu-btn {
        /* Match header action button padding: 12px 24px */
        padding: 12px 24px;
    }

    .user-menu-btn i {
        /* Size icon to fill the button reasonably */
        font-size: 1.75rem;
    }
}

/* --------------------------------------------------------------------------
   Auth Forms
   -------------------------------------------------------------------------- */
.content-card h1 {
    font-family: var(--font-heading);
    color: var(--text-primary);
}

.content-card .form-label {
    font-weight: 500;
    color: var(--text-primary);
}

.content-card .form-control {
    border-radius: 8px;
    border: 1px solid #ced4da;
    padding: 10px 14px;
}

.content-card .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(182, 77, 63, 0.25);
}

.content-card .form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.content-card .form-check-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(182, 77, 63, 0.25);
}

.content-card .form-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.content-card .alert-danger {
    background-color: rgba(182, 77, 63, 0.1);
    border-color: var(--primary);
    color: var(--primary-dark);
}

/* --------------------------------------------------------------------------
   Utility Classes
   -------------------------------------------------------------------------- */
.text-primary-color {
    color: var(--text-primary);
}

.bg-card {
    background-color: var(--card-bg);
}

.bg-body-color {
    background-color: var(--body-bg);
}

/* --------------------------------------------------------------------------
   Button Group with Forms (for delete buttons with CSRF tokens)
   -------------------------------------------------------------------------- */
.btn-group form {
    display: contents;
}

.btn-group > .btn:not(:last-child):not(.dropdown-toggle),
.btn-group > form:not(:last-child) .btn {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.btn-group > .btn:not(:first-child),
.btn-group > form:not(:first-child) .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    margin-left: calc(var(--bs-border-width) * -1);
}

/* --------------------------------------------------------------------------
   Shared Card Components (from landing page)
   -------------------------------------------------------------------------- */
.card-base {
    background-color: var(--card-bg);
    border-radius: var(--border-radius-card);
    box-shadow: var(--shadow-card);
}

.card-padding {
    padding: 20px;
}

@media (min-width: 768px) {
    .card-padding {
        padding: 50px;
    }
}

@media (min-width: 1200px) {
    .card-padding {
        padding: 70px;
    }
}

/* --------------------------------------------------------------------------
   Responsive Typography
   -------------------------------------------------------------------------- */
.heading-responsive {
    font-size: 20px;
    font-weight: 700;
    font-family: var(--font-heading);
}

@media (min-width: 768px) {
    .heading-responsive {
        font-size: 24px;
    }
}

@media (min-width: 1200px) {
    .heading-responsive {
        font-size: 36px;
    }
}

/* --------------------------------------------------------------------------
   Hero Carousel Styles
   -------------------------------------------------------------------------- */

/* Carousel Container */
.hero-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: var(--card-bg);
    border-radius: var(--border-radius-card);
    box-shadow: var(--shadow-card);
}

/* Slides Container */
.carousel-slides {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 580px;
}

/* Individual Slide */
.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: none;
    background: var(--card-bg);
}

.carousel-slide.active {
    opacity: 1;
    visibility: visible;
}

/* Animation Classes - Exit animations */
.carousel-slide.exit-left {
    animation: slideOutLeft var(--carousel-speed, 500ms) ease-in-out forwards;
}

.carousel-slide.exit-right {
    animation: slideOutRight var(--carousel-speed, 500ms) ease-in-out forwards;
}

/* Animation Classes - Enter animations */
.carousel-slide.enter-left {
    animation: slideInLeft var(--carousel-speed, 500ms) ease-in-out forwards;
}

.carousel-slide.enter-right {
    animation: slideInRight var(--carousel-speed, 500ms) ease-in-out forwards;
}

/* Keyframe Animations */
@keyframes slideOutLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-100%);
        opacity: 0;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Arrow Buttons */
.carousel-arrow {
    position: absolute;
    top: 90px;
    transform: none;
    background: none;
    border: none;
    color: var(--primary);
    font-size: 1.35rem;
    cursor: pointer;
    z-index: 10;
    transition: opacity 0.3s ease, transform 0.2s ease;
    padding: 0;
    line-height: 1;
}

.carousel-arrow:hover {
    opacity: 0.8;
    transform: scale(1.1);
}

.carousel-arrow:active {
    transform: scale(0.95);
}

.carousel-arrow-left {
    left: 10px;
}

.carousel-arrow-right {
    right: 10px;
}

.carousel-arrow i {
    display: block;
}

/* Indicator Dots */
.carousel-indicators {
    position: absolute;
    bottom: auto;
    top: 160px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    z-index: 10;
    margin: 0 !important;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid var(--primary);
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.carousel-dot:hover {
    background-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.carousel-dot.active {
    background-color: var(--primary);
    transform: scale(1.3);
}

/* --------------------------------------------------------------------------
   Hero Card Styles - Base Structure
   -------------------------------------------------------------------------- */
.hero-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    height: 100%;
}

.hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
    order: 1;
}

.hero-heading {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 22px;
    margin-bottom: 10px;
}

.hero-text {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.3;
    margin-bottom: 10px;
}

.hero-text:last-of-type {
    margin-bottom: 12px;
}

.hero-buttons {
    display: flex;
    gap: 10px;
    flex-direction: column;
    align-items: stretch;
}

.hero-btn {
    text-decoration: none;
    padding: 8px 12px;
    font-size: 12px;
    text-align: center;
}

.hero-image {
    position: relative;
    flex: 0 0 auto;
    width: 100%;
    height: 180px;
    order: -1;
    margin: 0;
    padding: 0;
}

.hero-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius-card) var(--border-radius-card) 0 0;
}

/* --------------------------------------------------------------------------
   Hero Carousel Responsive - Tablet (768px+)
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
    .carousel-slides {
        height: 400px;
    }

    .carousel-arrow {
        font-size: 1.65rem;
        top: 50%;
        transform: translateY(-50%);
    }

    .carousel-arrow:hover {
        transform: translateY(-50%) scale(1.1);
    }

    .carousel-arrow:active {
        transform: translateY(-50%) scale(0.95);
    }

    .carousel-arrow-left {
        left: 15px;
    }

    .carousel-arrow-right {
        right: 15px;
    }

    .carousel-indicators {
        bottom: 1rem;
        top: auto;
    }

    .hero-card {
        flex-direction: row;
    }

    .hero-image {
        flex: 0 0 33.333%;
        width: 33.333%;
        height: 100%;
        order: 0;
    }

    .hero-image img {
        border-radius: 0 var(--border-radius-card) var(--border-radius-card) 0;
    }

    .hero-content {
        padding: 30px 15px 30px 60px;
        order: 0;
    }

    .hero-heading {
        font-size: 28px;
        margin-bottom: 12px;
    }

    .hero-text {
        font-size: 13px;
        line-height: 1.4;
        margin-bottom: 12px;
    }

    .hero-text:last-of-type {
        margin-bottom: 16px;
    }

    .hero-buttons {
        gap: 15px;
        flex-direction: row;
        align-items: center;
    }

    .hero-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* --------------------------------------------------------------------------
   Hero Carousel Responsive - Desktop (1200px+)
   -------------------------------------------------------------------------- */
@media (min-width: 1200px) {
    .carousel-slides {
        height: 500px;
    }

    .carousel-arrow {
        font-size: 2rem;
        top: 50%;
        transform: translateY(-50%);
    }

    .carousel-arrow:hover {
        transform: translateY(-50%) scale(1.1);
    }

    .carousel-arrow:active {
        transform: translateY(-50%) scale(0.95);
    }

    .carousel-arrow-left {
        left: 20px;
    }

    .carousel-arrow-right {
        right: 20px;
    }

    .hero-content {
        padding: 70px 20px 70px 70px;
    }

    .hero-heading {
        font-size: 46px;
        line-height: 1.2;
        margin-bottom: 20px;
    }

    .hero-text {
        font-size: 16px;
        line-height: 1.5;
        margin-bottom: 20px;
    }

    .hero-text:last-of-type {
        margin-bottom: 24px;
    }

    .hero-buttons {
        gap: 30px;
        flex-direction: row;
        align-items: center;
    }

    .hero-btn {
        padding: 12px 24px;
        font-size: 16px;
    }
}

/* --------------------------------------------------------------------------
   Image Upload Modal Styles
   -------------------------------------------------------------------------- */

/* Thumbnail Grid - Flexbox layout for thumbnails */
.image-upload-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-start;
}

/* Individual Thumbnail Container */
.image-upload-thumbnail {
    position: relative;
    width: calc(33.333% - 8px);
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background-color: var(--body-bg);
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.image-upload-thumbnail:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.image-upload-thumbnail:active {
    transform: scale(0.98);
}

/* Thumbnail Image */
.image-upload-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Image Type Badge */
.image-upload-type-badge {
    position: absolute;
    bottom: 6px;
    left: 6px;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    background-color: var(--primary);
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    pointer-events: none;
    transition: background-color 0.2s ease;
}

/* Type-specific badge colors */
.image-upload-type-artwork {
    background-color: var(--primary);
}

.image-upload-type-artwork-detail {
    background-color: var(--secondary-dark);
}

.image-upload-type-artwork-reference {
    background-color: #6c757d;
}

.image-upload-type-photo {
    background-color: var(--primary-dark);
}

/* Remove Button */
.image-upload-remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease, background-color 0.2s ease;
}

.image-upload-thumbnail:hover .image-upload-remove-btn {
    opacity: 1;
}

.image-upload-remove-btn:hover {
    background-color: var(--primary);
}

.image-upload-remove-btn:focus {
    opacity: 1;
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Loading Overlay */
.image-upload-loading {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: var(--border-radius-card);
}

/* --------------------------------------------------------------------------
   Image Upload Modal - Tablet Responsive (768px+)
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
    .image-upload-grid {
        gap: 16px;
    }

    .image-upload-thumbnail {
        width: calc(25% - 12px);
    }

    .image-upload-type-badge {
        bottom: 8px;
        left: 8px;
        padding: 3px 10px;
        font-size: 11px;
    }

    .image-upload-remove-btn {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }
}

/* --------------------------------------------------------------------------
   Image Upload Modal - Desktop Responsive (1200px+)
   -------------------------------------------------------------------------- */
@media (min-width: 1200px) {
    .image-upload-grid {
        gap: 20px;
    }

    .image-upload-thumbnail {
        width: calc(20% - 16px);
    }

    .image-upload-type-badge {
        bottom: 10px;
        left: 10px;
        padding: 4px 12px;
        font-size: 12px;
    }

    .image-upload-remove-btn {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
}

/* --------------------------------------------------------------------------
   Poll Voting Styles - Mobile First
   -------------------------------------------------------------------------- */

/* Poll Status Badges */
.poll-status-badge {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 500;
}

.poll-status-active {
    background-color: #198754;
    color: #fff;
}

.poll-status-closed {
    background-color: #6c757d;
    color: #fff;
}

.poll-status-draft {
    background-color: #ffc107;
    color: #212529;
}

.poll-status-archived {
    background-color: #212529;
    color: #fff;
}

/* Poll Countdown Alert */
.poll-countdown {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 8px;
}

/* Poll User Vote Indicator */
.poll-user-vote {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 12px 16px;
    border-radius: 8px;
}

/* Poll Info List */
.poll-info-list li {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.poll-info-list li:last-child {
    border-bottom: none;
}

/* --------------------------------------------------------------------------
   Poll Option Cards
   -------------------------------------------------------------------------- */
.poll-options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.poll-option-card {
    position: relative;
    background-color: #fff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
}

.poll-option-card:hover {
    border-color: var(--primary-light);
    background-color: rgba(182, 77, 63, 0.02);
}

.poll-option-card:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(182, 77, 63, 0.15);
}

.poll-option-card.selected {
    border-color: var(--primary);
    background-color: rgba(182, 77, 63, 0.05);
}

.poll-option-card .form-check {
    margin: 0;
    padding-left: 0;
}

.poll-option-card .form-check-input {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    margin: 0;
    cursor: pointer;
}

.poll-option-card .form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.poll-option-card .form-check-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(182, 77, 63, 0.25);
}

.poll-option-label {
    display: block;
    padding-right: 50px;
    cursor: pointer;
}

.poll-option-label .option-text {
    font-weight: 500;
    color: var(--text-primary);
}

.poll-option-label .option-info {
    margin-top: 4px;
    font-size: 13px;
}

/* Selected Option Badge */
.poll-option-badge {
    position: absolute;
    top: -8px;
    left: 12px;
    width: 24px;
    height: 24px;
    background-color: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* --------------------------------------------------------------------------
   Poll Results Styles
   -------------------------------------------------------------------------- */
.poll-results-summary {
    padding: 12px 16px;
    background-color: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
}

.result-stat {
    font-size: 14px;
}

.poll-results-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.poll-result-option {
    padding: 16px;
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.poll-result-option.winner {
    border-color: #198754;
    background-color: rgba(25, 135, 84, 0.03);
}

.poll-result-option.user-voted {
    box-shadow: inset 3px 0 0 var(--primary);
}

.poll-result-option .option-label-wrapper {
    flex-wrap: wrap;
}

.poll-result-option .option-label {
    font-weight: 500;
    color: var(--text-primary);
}

.poll-result-option .option-stats {
    font-size: 13px;
    white-space: nowrap;
}

/* Winner and User Vote Badges */
.winner-badge,
.user-vote-badge {
    font-size: 10px;
    padding: 2px 8px;
}

/* Progress Bars */
.poll-progress {
    border-radius: 8px;
    background-color: #e9ecef;
    overflow: hidden;
}

.poll-progress .progress-bar {
    border-radius: 8px;
    transition: width 0.6s ease-out;
}

/* Voter Names List */
.voter-toggle {
    font-size: 13px;
    text-decoration: none;
}

.voter-toggle:hover {
    text-decoration: underline;
}

.voter-toggle[aria-expanded="true"] .bi-chevron-down {
    transform: rotate(180deg);
}

.voter-toggle .bi-chevron-down {
    transition: transform 0.2s ease;
}

.voter-list {
    padding-left: 16px;
}

.voter-list li {
    padding: 4px 0;
}

/* --------------------------------------------------------------------------
   Poll Voting Actions
   -------------------------------------------------------------------------- */
.poll-voting-actions .btn {
    min-height: 44px;
    font-weight: 500;
}

.poll-submit-btn,
.poll-withdraw-btn {
    position: relative;
}

/* --------------------------------------------------------------------------
   Poll Voting Tablet Styles (768px+)
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
    .poll-option-card {
        padding: 20px;
    }

    .poll-option-card .form-check-input {
        right: 20px;
    }

    .poll-option-label {
        padding-right: 60px;
    }

    .poll-result-option {
        padding: 20px;
    }

    .poll-result-option .option-stats {
        font-size: 14px;
    }

    .winner-badge,
    .user-vote-badge {
        font-size: 11px;
        padding: 3px 10px;
    }
}

/* --------------------------------------------------------------------------
   Poll Voting Desktop Styles (1200px+)
   -------------------------------------------------------------------------- */
@media (min-width: 1200px) {
    .poll-options-list {
        gap: 16px;
    }

    .poll-option-card {
        padding: 24px;
    }

    .poll-option-card .form-check-input {
        right: 24px;
        width: 24px;
        height: 24px;
    }

    .poll-option-label .option-text {
        font-size: 16px;
    }

    .poll-result-option {
        padding: 24px;
    }

    .poll-progress {
        height: 28px;
    }

    .winner-badge,
    .user-vote-badge {
        font-size: 12px;
        padding: 4px 12px;
    }
}

/* ==========================================================================
   AVAILABILITY GRID STYLES
   ========================================================================== */

/* Availability Voting Grid */
.availability-grid-voting {
    margin-bottom: 1rem;
}

.availability-grid-table {
    margin-bottom: 0;
}

.availability-grid-table th,
.availability-grid-table td {
    vertical-align: middle;
}

.availability-header-label {
    min-width: 200px;
}

.availability-header-action {
    width: 80px;
}

.availability-label {
    padding: 0.75rem 1rem;
}

.availability-label .option-text {
    font-weight: 500;
}

/* Availability Button Styles */
.availability-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.25rem;
    transition: all 0.2s ease;
}

.availability-btn:hover {
    transform: scale(1.1);
}

.availability-btn-yes:checked + label,
.btn-check:checked + .availability-btn-yes {
    background-color: var(--bs-success);
    border-color: var(--bs-success);
    color: white;
}

.availability-btn-maybe:checked + label,
.btn-check:checked + .availability-btn-maybe {
    background-color: var(--bs-warning);
    border-color: var(--bs-warning);
    color: black;
}

.availability-btn-no:checked + label,
.btn-check:checked + .availability-btn-no {
    background-color: var(--bs-danger);
    border-color: var(--bs-danger);
    color: white;
}

/* Availability Icon Indicators */
.availability-icon,
.availability-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 1rem;
}

.availability-icon.small,
.availability-indicator.small {
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
}

.availability-yes {
    background-color: var(--bs-success);
    color: white;
}

.availability-maybe {
    background-color: var(--bs-warning);
    color: black;
}

.availability-no {
    background-color: var(--bs-danger);
    color: white;
}

.availability-none {
    background-color: var(--bs-light);
    color: var(--bs-secondary);
}

/* Availability Row States */
.availability-row.availability-selected-yes {
    background-color: rgba(25, 135, 84, 0.1);
}

.availability-row.availability-selected-maybe {
    background-color: rgba(255, 193, 7, 0.1);
}

.availability-row.availability-selected-no {
    background-color: rgba(220, 53, 69, 0.1);
}

/* Availability Card States (Mobile) */
.availability-card.availability-selected-yes {
    border-color: var(--bs-success);
    background-color: rgba(25, 135, 84, 0.05);
}

.availability-card.availability-selected-maybe {
    border-color: var(--bs-warning);
    background-color: rgba(255, 193, 7, 0.05);
}

.availability-card.availability-selected-no {
    border-color: var(--bs-danger);
    background-color: rgba(220, 53, 69, 0.05);
}

/* Availability Results */
.availability-grid-results {
    margin-bottom: 1rem;
}

.availability-results-table {
    font-size: 0.875rem;
}

.availability-results-table th,
.availability-results-table td {
    vertical-align: middle;
    padding: 0.5rem;
}

.availability-slot-header {
    min-width: 80px;
    max-width: 120px;
}

.availability-voter-header {
    min-width: 150px;
}

.availability-voter-name {
    font-weight: 500;
    white-space: nowrap;
}

.availability-cell {
    padding: 0.5rem;
}

/* Best Slot Highlighting */
.best-slot {
    background-color: rgba(25, 135, 84, 0.15) !important;
}

.best-slot-cell {
    background-color: rgba(25, 135, 84, 0.1);
}

.best-slot-card {
    border-width: 2px;
}

/* Summary Row */
.availability-summary-row {
    font-weight: 500;
}

.availability-summary-counts {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: center;
}

.availability-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
}

.availability-yes-count {
    color: var(--bs-success);
}

.availability-maybe-count {
    color: var(--bs-warning);
}

.availability-no-count {
    color: var(--bs-danger);
}

.availability-count .count {
    font-weight: 600;
}

/* Availability Legend */
.availability-legend {
    padding-top: 0.5rem;
    border-top: 1px solid var(--bs-border-color);
}

/* Mobile Availability Cards */
.availability-cards .card {
    transition: all 0.2s ease;
}

.availability-cards .btn-group {
    flex-wrap: nowrap;
}

.availability-cards .btn-group .btn {
    flex: 1;
    padding: 0.75rem 0.5rem;
    font-size: 0.875rem;
}

/* Results Mobile Cards */
.availability-result-card .card-header {
    padding: 0.75rem 1rem;
}

.availability-result-card .card-body {
    padding: 1rem;
}

.availability-voters-list {
    max-height: 150px;
    overflow-y: auto;
}

/* Responsive Adjustments */
@media (max-width: 767.98px) {
    .availability-grid-container {
        display: none;
    }

    .availability-cards {
        display: block;
    }

    .availability-results-cards {
        display: block;
    }
}

@media (min-width: 768px) {
    .availability-cards {
        display: none;
    }

    .availability-results-cards {
        display: none;
    }

    .availability-grid-container {
        display: block;
    }
}

/* Accessibility: Focus states */
.availability-btn:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.availability-card:focus-within {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* ==========================================================================
   Bilder Feed Styles
   ========================================================================== */

/* Bilder feed grid */
.bilder-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .bilder-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 1200px) {
    .bilder-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }
}

/* --------------------------------------------------------------------------
   Image-Centric Post Card Styles
   -------------------------------------------------------------------------- */

.post-card {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
    transform: translateY(-4px);
}

.post-card:active {
    transform: translateY(-2px);
}

/* Post card header (user and date) */
.post-card-header {
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.post-card-follow-form {
    margin: 0;
}

.post-card-follow-btn {
    font-size: 12px;
    padding: 2px 10px;
    border-radius: 4px;
    background: var(--primary);
    color: white;
    border: 1px solid var(--primary);
    transition: background 0.2s ease, color 0.2s ease;
}

.post-card-follow-btn:hover {
    background: var(--primary-dark, #8b4513);
    color: white;
}

.post-card-follow-btn.following {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.post-card-follow-btn.following:hover {
    background: var(--primary);
    color: white;
}

.post-card-user {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.post-card-date {
    font-size: 12px;
    color: #6c757d;
    margin-top: 2px;
}

/* Post card image container */
.post-card-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 12px;
    background-color: var(--body-bg);
    margin-bottom: 0.75rem;
}

.post-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.post-card:hover .post-card-image {
    transform: scale(1.05);
}

/* Image count indicator */
.post-card-image-count {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(4px);
}

.post-card-image-count i {
    font-size: 14px;
}

/* Post card caption */
.post-card-caption {
    font-size: 14px;
    line-height: 1.4;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Post card overlay (hover) - icons only, no darkening */
.post-card-overlay {
    position: absolute;
    bottom: 8px;
    right: 8px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.post-card-image-container:hover .post-card-overlay {
    opacity: 1;
    visibility: visible;
}

/* Overlay icons container */
.post-card-overlay-icons {
    display: flex;
    gap: 2px;
    align-items: center;
}

/* Individual overlay icon - small rounded square buttons
   Adjust --overlay-icon-size to change icon size easily */
.post-card-overlay-icon {
    --overlay-icon-size: 40px;
    --overlay-icon-font-size: 20px;

    width: var(--overlay-icon-size);
    height: var(--overlay-icon-size);
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
    text-decoration: none;
}

.post-card-overlay-icon:hover {
    background: rgba(0, 0, 0, 0.8);
    color: white;
}

.post-card-overlay-icon:active {
    background: rgba(0, 0, 0, 0.9);
}

.post-card-overlay-icon i {
    font-size: var(--overlay-icon-font-size);
}

@media (min-width: 768px) {
    .post-card-user {
        font-size: 15px;
    }

    .post-card-date {
        font-size: 13px;
    }

    .post-card-caption {
        font-size: 15px;
    }

    .post-card-image-count {
        font-size: 13px;
        padding: 5px 12px;
    }
}

@media (min-width: 1200px) {
    .post-card-user {
        font-size: 16px;
    }

    .post-card-caption {
        font-size: 16px;
    }
}

/* --------------------------------------------------------------------------
   Bilder Details Page Carousel Styles
   -------------------------------------------------------------------------- */

/* Details carousel container */
.details-carousel-container {
    position: relative;
    width: 100%;
    background-color: var(--body-bg);
    border-radius: 12px;
    overflow: hidden;
}

/* Details carousel slides wrapper */
.details-carousel-slides {
    position: relative;
    width: 100%;
    min-height: 300px;
}

/* Individual carousel slide */
.details-carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.details-carousel-slide.active {
    opacity: 1;
    visibility: visible;
    position: relative;
}

/* Carousel image */
.details-carousel-image {
    max-width: 100%;
    max-height: 500px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* Carousel navigation arrows */
.details-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: var(--primary);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.details-carousel-arrow:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.details-carousel-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.details-carousel-arrow-left {
    left: 10px;
}

.details-carousel-arrow-right {
    right: 10px;
}

.details-carousel-arrow i {
    display: block;
}

/* Carousel indicator dots */
.details-carousel-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.details-carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid var(--primary);
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.details-carousel-dot:hover {
    background-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.details-carousel-dot.active {
    background-color: var(--primary);
    transform: scale(1.3);
}

/* Caption display below carousel */
.details-carousel-caption {
    padding: 1rem 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    min-height: 2em;
}

@media (min-width: 768px) {
    .details-carousel-slides {
        min-height: 400px;
    }

    .details-carousel-image {
        max-height: 600px;
    }

    .details-carousel-arrow {
        width: 48px;
        height: 48px;
        font-size: 1.75rem;
    }

    .details-carousel-arrow-left {
        left: 15px;
    }

    .details-carousel-arrow-right {
        right: 15px;
    }

    .details-carousel-indicators {
        bottom: 20px;
    }

    .details-carousel-dot {
        width: 12px;
        height: 12px;
    }

    .details-carousel-caption {
        font-size: 15px;
        padding: 1.25rem 0;
    }
}

@media (min-width: 1200px) {
    .details-carousel-slides {
        min-height: 500px;
    }

    .details-carousel-image {
        max-height: 700px;
    }

    .details-carousel-arrow {
        width: 52px;
        height: 52px;
        font-size: 2rem;
    }

    .details-carousel-arrow-left {
        left: 20px;
    }

    .details-carousel-arrow-right {
        right: 20px;
    }

    .details-carousel-caption {
        font-size: 16px;
        padding: 1.5rem 0;
    }
}

/* Comments placeholder styling */
.comments-placeholder {
    padding: 2rem;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

/* --------------------------------------------------------------------------
   Image Lightbox Styles
   -------------------------------------------------------------------------- */

.image-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-lightbox.active {
    display: block;
    opacity: 1;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
}

.lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Close button */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 10;
    transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.lightbox-close:active {
    transform: scale(0.95);
}

/* Image container */
.lightbox-image-container {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 90vw;
    max-height: 90vh;
    height: auto;
    width: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
}

/* Navigation arrows */
.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    transition: opacity 0.2s ease, transform 0.2s ease;
    padding: 10px;
}

.lightbox-arrow:hover {
    opacity: 0.8;
    transform: translateY(-50%) scale(1.1);
}

.lightbox-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.lightbox-arrow-left {
    left: 20px;
}

.lightbox-arrow-right {
    right: 20px;
}

.lightbox-arrow i {
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

/* Image counter */
.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    backdrop-filter: blur(4px);
}

@media (min-width: 768px) {
    .lightbox-content {
        padding: 40px;
    }

    .lightbox-close {
        top: 30px;
        right: 30px;
        width: 48px;
        height: 48px;
        font-size: 28px;
    }

    .lightbox-arrow {
        font-size: 2.5rem;
    }

    .lightbox-arrow-left {
        left: 30px;
    }

    .lightbox-arrow-right {
        right: 30px;
    }

    .lightbox-counter {
        bottom: 30px;
        font-size: 16px;
        padding: 10px 20px;
    }
}

@media (min-width: 1200px) {
    .lightbox-arrow {
        font-size: 3rem;
    }

    .lightbox-arrow-left {
        left: 40px;
    }

    .lightbox-arrow-right {
        right: 40px;
    }
}

/* --------------------------------------------------------------------------
   Old Post Card Styles (for backwards compatibility)
   -------------------------------------------------------------------------- */

/* Post card image grid */
.post-image-grid {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(2, 1fr);
}

.post-image-thumbnail {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
}

.post-image-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-image-more {
    aspect-ratio: 1;
    border-radius: 8px;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--primary-dark);
}

/* Post detail page */
.post-detail-image {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
}

/* Tab navigation */
.nav-tabs {
    border-bottom: 2px solid var(--primary);
}

.nav-tabs .nav-link {
    color: var(--primary-dark);
    border: none;
    padding: 0.75rem 1.5rem;
    transition: all 0.2s ease;
}

.nav-tabs .nav-link.active {
    background: var(--primary);
    color: white;
    border-radius: 8px 8px 0 0;
}

.nav-tabs .nav-link:hover:not(.active) {
    background: var(--primary-light);
    color: var(--primary-dark);
}

/* --------------------------------------------------------------------------
   Overview Dashboard Columns
   -------------------------------------------------------------------------- */
.dashboard-column {
    background: var(--card-bg);
    border-radius: var(--border-radius-card);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.dashboard-column-header {
    background: var(--primary);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    color: var(--card-bg);
    transition: opacity 0.2s ease;
}

.dashboard-column-header:hover {
    color: var(--card-bg);
    opacity: 0.9;
}

.dashboard-column-header-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--card-bg);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.dashboard-column-header-title i {
    font-size: 1.1rem;
}


.dashboard-column-content {
    padding: 1rem;
}

/* --------------------------------------------------------------------------
   Footer Styles
   -------------------------------------------------------------------------- */
.site-footer {
    background-color: var(--card-bg);
    padding: 50px 0 40px;
    margin-top: auto; /* Push to bottom on short pages */
    flex-shrink: 0;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-brand {
    display: flex;
    align-items: center;
}

.footer-logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.footer-logo-link:hover {
    text-decoration: none;
}

.footer-logo {
    height: 40px;
    width: auto;
}

.footer-brand-text {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.05em;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.footer-nav a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-nav a:hover {
    color: var(--primary);
}

/* Tablet and up */
@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .footer-nav {
        flex-direction: row;
        gap: 2rem;
    }
}
