/* Action buttons - modern design in top bar */

.top-bar-buttons-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    flex-wrap: wrap;
    min-height: 60px; /* Ensure adequate height */
}

/* Ensure fbTopBar has enough height for buttons */
#fbTopBar {
    min-height: 80px !important;
    padding: 8px 16px !important;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-button.modern {
    padding: 12px 20px;
    background-color: #007bff;
    color: white !important;
    border: none;
    border-radius: 8px;
    text-decoration: none !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.025em;
    min-height: 40px;
    line-height: 1.2;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.action-button.modern:hover {
    background-color: #0056b3 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.4);
    color: white !important;
    text-decoration: none !important;
}

.action-button.modern:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.download-icon {
    font-size: 16px;
    font-weight: bold;
    display: inline-block;
    transition: transform 0.2s ease;
}

.action-button.modern:hover .download-icon {
    transform: translateY(1px);
}

/* Removed Impressum icon styling (no icon now) */

/* Hide top bar on small views - buttons will be in bottom container instead */
@media (max-width: 1024px) {
    #fbTopBar {
        display: none !important;
    }
    
    /* Style for buttons inside bottom grid on mobile */
    .mobile-bottom-buttons {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 10px;
        margin-bottom: 16px;
        padding-bottom: 12px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .mobile-bottom-buttons .action-button.modern {
        font-size: 12px;
        padding: 8px 12px;
        gap: 4px;
        text-align: center;
        width: auto;
        max-width: 200px;
        margin: 0;
        min-height: 30px;
    }
    
    .mobile-bottom-buttons .download-icon {
        font-size: 12px;
    }
}

/* Explicit ordering for top and bottom button groups in small view layout */
@media (max-width: 1024px) {
    .mobile-bottom-buttons-top { order: -1; }
    .mobile-images-grid { order: 0; }
    .mobile-bottom-buttons-bottom { order: 1; margin-top: 8px; border-bottom: none; padding-bottom: 0; }
}

/* Impressum modal styles */
.impressum-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.impressum-modal.show {
    opacity: 1;
    visibility: visible;
}

.impressum-modal-content {
    position: relative;
    background: #ffffff;
    color: #222;
    border-radius: 12px;
    width: min(90vw, 420px);
    max-width: 90vw;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    padding: 20px 24px 22px 24px;
    transform: translateY(-8px);
    transition: transform 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', 'Helvetica Neue', Arial, sans-serif;
}

.impressum-modal.show .impressum-modal-content {
    transform: translateY(0);
}

.impressum-modal-title {
    margin: 0 0 12px 0;
    font-size: 20px; /* Slightly larger */
    font-weight: 600;
}

.impressum-modal-body {
    font-size: 14px;
    line-height: 1.5;
}

.impressum-modal-body a {
    color: #007bff;
    text-decoration: none;
}

.impressum-modal-body a:hover {
    text-decoration: underline;
}

.impressum-modal-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #444;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.impressum-modal-close:hover {
    background: rgba(0, 0, 0, 0.06);
}

@media (max-width: 480px) {
    .mobile-bottom-buttons {
        gap: 8px;
        margin-bottom: 12px;
        padding-bottom: 10px;
    }
    
    .mobile-bottom-buttons .action-button.modern {
        font-size: 11px;
        padding: 6px 10px;
        max-width: 180px;
    }
    
    .mobile-bottom-buttons .download-icon {
        font-size: 11px;
    }
}

/* Small view persistent bottom bar (when not using bottom grid layout) */
@media (max-width: 1024px) {
    .small-view-buttons {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1100;
        background: rgba(255,255,255,0.92);
        box-shadow: 0 -6px 20px rgba(0,0,0,0.25);
        backdrop-filter: blur(4px);
        padding: 10px 12px;
        gap: 10px;
        flex-direction: row;
        justify-content: center;
        border: none;
        margin: 0;
    }
    .small-view-buttons .action-button.modern {
        font-size: 12px;
        padding: 8px 12px;
        min-height: 30px;
    }
}