/* Notion-style CSS Design System */

:root {
    --notion-bg-sidebar: #f7f7f5;
    --notion-bg-main: #ffffff;
    --notion-text-main: #37352f;
    --notion-text-muted: #7d7c78;
    --notion-border-color: #ededeb;
    --notion-hover-color: #efefed;
    --notion-active-color: #e8e8e6;
    --notion-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    --notion-font-title: 'Inter', sans-serif;
    --accent-color: #2eaadc; /* Notion blue */
    --success-color: #0f7b4e; /* Notion green */
    --shadow-sm: 0 1px 3px rgba(15, 15, 15, 0.1);
    --shadow-md: 0 4px 12px rgba(15, 15, 15, 0.05), 0 2px 4px rgba(15, 15, 15, 0.05);
}

/* Reset and Core Layout */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--notion-font-sans);
    color: var(--notion-text-main);
    background-color: var(--notion-bg-main);
    line-height: 1.5;
    overflow: hidden; /* We scroll individual columns, not the window */
    -webkit-font-smoothing: antialiased;
}

.workspace-container {
    display: flex;
    width: 100vw;
    height: 100vh;
}

/* Left Sidebar styling */
.sidebar {
    width: 260px;
    height: 100%;
    background-color: var(--notion-bg-sidebar);
    border-right: 1px solid var(--notion-border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background 0.15s ease;
}

.sidebar-header:hover {
    background-color: var(--notion-hover-color);
}

.workspace-emoji {
    font-size: 20px;
    margin-right: 10px;
}

.workspace-details {
    display: flex;
    flex-direction: column;
}

.workspace-name {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.workspace-role {
    font-size: 11px;
    color: var(--notion-text-muted);
}

/* Sidebar Search */
.sidebar-search {
    position: relative;
    margin: 4px 12px 12px 12px;
}

.search-icon {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--notion-text-muted);
    font-size: 12px;
}

#search-input {
    width: 100%;
    background-color: var(--notion-hover-color);
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 6px 8px 6px 26px;
    font-size: 12px;
    font-family: var(--notion-font-sans);
    color: var(--notion-text-main);
    outline: none;
    transition: all 0.2s ease;
}

#search-input:focus {
    background-color: #ffffff;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(46, 170, 220, 0.2);
}

/* Sidebar Navigation Items */
.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 0 4px;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    margin: 2px 0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: var(--notion-text-main);
    font-weight: 500;
    transition: background 0.1s ease;
    user-select: none;
}

.menu-item:hover {
    background-color: var(--notion-hover-color);
}

.menu-item.active {
    background-color: var(--notion-active-color);
}

.menu-icon {
    margin-right: 8px;
    font-size: 15px;
}

.menu-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sub-sections */
.menu-section {
    margin-top: 16px;
}

.menu-section-header {
    display: flex;
    align-items: center;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--notion-text-muted);
    letter-spacing: 0.05em;
    user-select: none;
}

.section-toggle {
    margin-right: 6px;
    font-size: 9px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.submenu {
    list-style: none;
    padding-left: 14px;
}

.submenu li {
    display: flex;
    align-items: center;
    padding: 5px 12px;
    margin: 1px 0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: var(--notion-text-main);
    transition: background 0.1s ease;
}

.submenu li:hover {
    background-color: var(--notion-hover-color);
}

.submenu li.active {
    background-color: var(--notion-active-color);
    font-weight: 500;
}

.submenu li::before {
    content: "📄";
    margin-right: 8px;
    font-size: 12px;
}

.sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--notion-border-color);
}

.user-profile {
    display: flex;
    align-items: center;
}

.avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #e59371;
    color: white;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
}

.username {
    font-size: 12px;
    font-weight: 500;
}

/* Main Content Panel */
.main-content {
    flex: 1;
    height: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Page Cover and Headers */
.page-cover {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: #f0f0f0;
    transition: background-image 0.3s ease;
}

.page-header-container {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
}

.page-emoji-container {
    font-size: 72px;
    position: absolute;
    top: -50px;
    left: 40px;
    background-color: var(--notion-bg-main);
    border-radius: 20px;
    padding: 4px;
    line-height: 1;
    user-select: none;
    box-shadow: var(--shadow-sm);
}

.page-breadcrumbs {
    margin-top: 40px;
    font-size: 12px;
    color: var(--notion-text-muted);
}

.active-crumb {
    color: var(--notion-text-main);
    font-weight: 500;
}

/* Page Body */
.page-body {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 20px 40px 60px 40px;
    flex: 1;
}

.page-title {
    font-family: var(--notion-font-title);
    font-size: 38px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    margin-top: 10px;
    color: var(--notion-text-main);
}

.page-description-block {
    font-size: 15px;
    color: var(--notion-text-muted);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--notion-border-color);
}

/* Panels view toggling */
.content-panel {
    display: none;
}

.content-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Notion H2, H3 */
.notion-h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 28px 0 12px 0;
    border-bottom: 1px solid var(--notion-border-color);
    padding-bottom: 6px;
    display: flex;
    align-items: center;
}

.notion-h-icon {
    font-size: 14px;
    margin-right: 8px;
    color: var(--notion-text-muted);
}

.notion-h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 16px 0 10px 0;
    color: var(--notion-text-main);
}

.notion-description-note {
    font-size: 13px;
    color: var(--notion-text-muted);
    margin-bottom: 12px;
}

/* Dashboard statistics */
.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background-color: var(--notion-bg-sidebar);
    border: 1px solid var(--notion-border-color);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.stat-icon {
    font-size: 28px;
    margin-right: 12px;
}

.stat-data {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--notion-text-main);
}

.stat-label {
    font-size: 11px;
    color: var(--notion-text-muted);
    font-weight: 500;
}

/* Notion Table Design */
.notion-table-container {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--notion-border-color);
    border-radius: 6px;
    margin-bottom: 24px;
}

.notion-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

.notion-table th {
    background-color: var(--notion-bg-sidebar);
    color: var(--notion-text-muted);
    font-weight: 600;
    padding: 10px 12px;
    border-bottom: 1px solid var(--notion-border-color);
    border-right: 1px solid var(--notion-border-color);
    white-space: nowrap;
}

.notion-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--notion-border-color);
    border-right: 1px solid var(--notion-border-color);
    vertical-align: top;
}

.notion-table tr:last-child td {
    border-bottom: none;
}

.notion-table th:last-child, .notion-table td:last-child {
    border-right: none;
}

.notion-table tr {
    transition: background-color 0.1s;
}

.notion-table tr:hover {
    background-color: #fcfcfc;
}

/* Callout Block (Notion style) */
.notion-callout {
    display: flex;
    background-color: var(--notion-bg-sidebar);
    border-left: 3px solid var(--accent-color);
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 24px;
    font-size: 13px;
}

.callout-icon {
    font-size: 18px;
    margin-right: 12px;
    flex-shrink: 0;
}

.callout-content {
    flex: 1;
}

.callout-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px 16px;
}

.callout-grid div {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Notion-style tab header */
.notion-tabs {
    display: flex;
    border-bottom: 1px solid var(--notion-border-color);
    margin-bottom: 20px;
    overflow-x: auto;
}

.tab-button {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 8px 16px;
    font-family: var(--notion-font-sans);
    font-size: 13px;
    font-weight: 500;
    color: var(--notion-text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tab-button:hover {
    color: var(--notion-text-main);
    background-color: var(--notion-hover-color);
}

.tab-button.active {
    color: var(--notion-text-main);
    border-bottom-color: var(--accent-color);
    font-weight: 600;
}

.tab-content {
    display: none;
    animation: fadeIn 0.2s ease;
}

.tab-content.active {
    display: block;
}

/* Media/Photo Gallery Cards */
.media-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 10px;
}

.media-card {
    background-color: white;
    border: 1px solid var(--notion-border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

.media-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.media-img-wrapper {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background-color: #f0f0f0;
}

.media-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.media-card:hover .media-img-wrapper img {
    transform: scale(1.03);
}

.media-info {
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.media-tag {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background-color: var(--notion-active-color);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--notion-text-muted);
}

.media-link {
    font-size: 11px;
    color: var(--accent-color);
    text-decoration: none;
}

.media-link:hover {
    text-decoration: underline;
}

/* Dining Outlets Card Grid */
.dining-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.dining-card {
    background-color: white;
    border: 1px solid var(--notion-border-color);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

.dining-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.dining-card-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.dining-card-meta {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.dining-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.dining-badge.cuisine {
    background-color: #e3f2fd;
    color: #0d47a1;
}

.dining-badge.capacity {
    background-color: #e8f5e9;
    color: #1b5e20;
}

.dining-card-desc {
    font-size: 12px;
    color: var(--notion-text-muted);
    flex: 1;
}

/* Scrollbar styling for a native look */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(15, 15, 15, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(15, 15, 15, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .workspace-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--notion-border-color);
    }
    .main-content {
        height: auto;
    }
    .dashboard-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .media-gallery-grid, .dining-cards-grid {
        grid-template-columns: 1fr;
    }
}
