/* Edge Technologies Portfolio Web App Styles */

/* Font Face Definitions */
@font-face {
    font-family: 'EDGE-Light';
    src: url('../fonts/EDGE-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'EDGE-Book';
    src: url('../fonts/EDGE-Book.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'EDGE-Medium';
    src: url('../fonts/EDGE-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'EDGE-Bold';
    src: url('../fonts/EDGE-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'P22MackinacPro-Bold';
    src: url('../fonts/P22MackinacPro-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'P22MackinacProBook';
    src: url('../fonts/P22MackinacProBook.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'EDGE-Light', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #ffffff;
    color: #292E32;
    line-height: 1.6;
}

/* Header */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background-color: white;
    border-bottom: 1px solid #f0f0f0;
}

.building-title {
    flex: 1;
}

.building-title h1 {
    font-family: 'P22MackinacPro-Bold', serif;
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 4px;
}

.logo {
    width: 44px;
    height: 44px;
    margin-left: 12px;
}

/* Main content container */
.main-content {
    flex: 1;
    padding-bottom: 20px;
}

/* Tab navigation */
.tab-navigation {
    display: flex;
    background-color: white;
    border-bottom: 1px solid #f0f0f0;
}

.tab-button {
    flex: 1;
    background: none;
    border: none;
    padding: 15px;
    cursor: pointer;
    position: relative;
    font-size: 16px;
    color: #292E32;
    opacity: 0.6;
    transition: opacity 0.3s;
    font-family: 'EDGE-Light', sans-serif;
}

.tab-button.active {
    opacity: 1;
    font-family: 'EDGE-Bold', sans-serif;
    font-weight: bold;
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #292E32;
}

/* Tab content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Building info styles */
.building-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 20px;
}

.building-property {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 0 10px;
}

.property-item {
    flex: 1;
}

.property-label {
    font-family: 'EDGE-Bold', sans-serif;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 2px;
}

.property-value {
    font-family: 'EDGE-Light', sans-serif;
    font-size: 14px;
    color: #666;
}

.building-description {
    margin-top: 20px;
    padding: 0 10px;
}

.building-description h3 {
    font-family: 'EDGE-Bold', sans-serif;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 8px;
}

.building-description p {
    font-family: 'EDGE-Light', sans-serif;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* Image gallery styles */
.image-gallery-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.gallery-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 12px;
    cursor: pointer;
    font-size: 16px;
    color: #292E32;
    opacity: 0.6;
    position: relative;
    font-family: 'EDGE-Light', sans-serif;
}

.gallery-tab.active {
    opacity: 1;
    font-family: 'EDGE-Bold', sans-serif;
    font-weight: bold;
}

.gallery-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #292E32;
}

.gallery-content {
    display: none;
}

.gallery-content.active {
    display: block;
}

/* CSS Masonry met ID's */
.image-grid {
    position: relative;
    margin-bottom: 20px;
    padding: 0 20px;
}

/* Container heights voor verschillende galleries */
#all-photos .image-grid {
    height: 1864px; /* Hoogte van img16 + padding */
}

#community-photos .image-grid {
    height: 988px; /* Hoogte van comm8 + padding */
}

.image-item {
    position: absolute;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.image-item:hover {
    transform: scale(1.02);
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Kolom breedte berekening: (100% - 12px gap) / 2 = ~48% */
/* Linker kolom: left: 0, Rechter kolom: left: calc(50% + 6px) */

/* All Photos Layout */
#img1 { left: 0; top: 0; width: calc(50% - 6px); height: 200px; }
#img2 { left: calc(50% + 6px); top: 0; width: calc(50% - 6px); height: 280px; }
#img3 { left: 0; top: 212px; width: calc(50% - 6px); height: 160px; }
#img4 { left: calc(50% + 6px); top: 292px; width: calc(50% - 6px); height: 220px; }
#img5 { left: 0; top: 384px; width: calc(50% - 6px); height: 240px; }
#img6 { left: calc(50% + 6px); top: 524px; width: calc(50% - 6px); height: 180px; }
#img7 { left: 0; top: 636px; width: calc(50% - 6px); height: 300px; }
#img8 { left: calc(50% + 6px); top: 716px; width: calc(50% - 6px); height: 200px; }
#img9 { left: 0; top: 948px; width: calc(50% - 6px); height: 180px; }
#img10 { left: calc(50% + 6px); top: 928px; width: calc(50% - 6px); height: 260px; }
#img11 { left: 0; top: 1140px; width: calc(50% - 6px); height: 220px; }
#img12 { left: calc(50% + 6px); top: 1200px; width: calc(50% - 6px); height: 190px; }
#img13 { left: 0; top: 1372px; width: calc(50% - 6px); height: 280px; }
#img14 { left: calc(50% + 6px); top: 1402px; width: calc(50% - 6px); height: 240px; }
#img15 { left: 0; top: 1664px; width: calc(50% - 6px); height: 160px; }
#img16 { left: calc(50% + 6px); top: 1654px; width: calc(50% - 6px); height: 200px; }

/* Community Photos Layout */
#comm1 { left: 0; top: 0; width: calc(50% - 6px); height: 240px; }
#comm2 { left: calc(50% + 6px); top: 0; width: calc(50% - 6px); height: 180px; }
#comm3 { left: 0; top: 252px; width: calc(50% - 6px); height: 300px; }
#comm4 { left: calc(50% + 6px); top: 192px; width: calc(50% - 6px); height: 220px; }
#comm5 { left: 0; top: 564px; width: calc(50% - 6px); height: 160px; }
#comm6 { left: calc(50% + 6px); top: 424px; width: calc(50% - 6px); height: 280px; }
#comm7 { left: 0; top: 736px; width: calc(50% - 6px); height: 200px; }
#comm8 { left: calc(50% + 6px); top: 716px; width: calc(50% - 6px); height: 260px; }

.community-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 10px;
    font-family: 'EDGE-Bold', sans-serif;
    font-weight: bold;
}

/* Community section */
.upload-button {
    width: 100%;
    background-color: #292E32;
    color: white;
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'EDGE-Bold', sans-serif;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Video player placeholder */
.video-placeholder {
    width: 100%;
    height: 300px;
    background-color: #f0f0f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 18px;
    margin-bottom: 20px;
    font-family: 'EDGE-Light', sans-serif;
}

/* 360 view placeholder */
.panorama-placeholder {
    width: 100%;
    height: 400px;
    background-color: #f0f0f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 18px;
    margin-bottom: 20px;
    font-family: 'EDGE-Light', sans-serif;
}

/* PDF list */
.pdf-list {
    list-style: none;
}

.pdf-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.pdf-item:hover {
    background-color: #f9f9f9;
}

.pdf-icon {
    width: 40px;
    height: 40px;
    background-color: #292E32;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: 'EDGE-Bold', sans-serif;
    font-weight: bold;
    margin-right: 12px;
}

/* Bottom navigation - Fixed/Sticky */
.bottom-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px 20px;
    background-color: white;
    border-top: 1px solid #f0f0f0;
    gap: 20px;
    position: sticky;
    bottom: 0;
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.nav-button {
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.3s;
}

.nav-button.active {
    opacity: 1;
}

.nav-button img {
    width: 40px;
    height: 40px;
}

/* Responsive */
@media (max-width: 480px) {
    .building-property {
        flex-direction: column;
        gap: 16px;
    }

    .property-item:last-child {
        text-align: left;
    }
}

/* App container */
.app-container {
    max-width: 480px;
    margin: 0 auto;
    background-color: white;
    height: 100vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* Admin styles */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.admin-header {
    background-color: #292E32;
    color: white;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 8px;
}

.admin-header h1 {
    font-family: 'P22MackinacPro-Bold', serif;
    font-size: 28px;
    margin-bottom: 10px;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-number {
    font-family: 'EDGE-Bold', sans-serif;
    font-size: 32px;
    color: #292E32;
    margin-bottom: 5px;
}

.stat-label {
    font-family: 'EDGE-Light', sans-serif;
    color: #666;
    font-size: 14px;
}

.upload-card {
    background-color: white;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.upload-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 15px;
}

.upload-id {
    font-family: 'EDGE-Medium', sans-serif;
    font-size: 16px;
    color: #292E32;
}

.upload-date {
    font-family: 'EDGE-Light', sans-serif;
    font-size: 12px;
    color: #666;
}

.upload-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'EDGE-Medium', sans-serif;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn-approve {
    background-color: #28a745;
    color: white;
}

.btn-approve:hover {
    background-color: #218838;
}

.btn-reject {
    background-color: #dc3545;
    color: white;
}

.btn-reject:hover {
    background-color: #c82333;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.photo-preview {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
}

/* Messages */
.alert {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-family: 'EDGE-Medium', sans-serif;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Utility classes */
.link-unstyled { text-decoration: none; color: inherit; }
.text-right { text-align: right; }
.mr-1 { margin-right: 1rem; }

/* Always-available session controls on authenticated admin pages. */
.admin-session-controls {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1100;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 0.75rem;
    background: rgba(15, 23, 42, 0.94);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.24);
}

.admin-session-controls form {
    margin: 0;
}

.admin-session-link,
.admin-session-logout {
    display: inline-flex;
    min-height: 2.25rem;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.75rem;
    border: 0;
    border-radius: 0.5rem;
    font: 600 0.875rem/1 system-ui, sans-serif;
    text-decoration: none;
    cursor: pointer;
}

.admin-session-link {
    color: #e2e8f0;
    background: transparent;
}

.admin-session-link:hover,
.admin-session-link:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.admin-session-logout {
    color: #fff;
    background: #b91c1c;
}

.admin-session-logout:hover,
.admin-session-logout:focus-visible {
    background: #991b1b;
}
