@import "themes.css";
@import "user-card.css";
@import "modal.css";
@import "archive-modal.css";

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Roboto", system-ui, -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
}

/* Elegant Header */
#header {
    background: var(--bg-header);
    backdrop-filter: blur(20px);
    color: var(--text-primary);
    padding: var(--header-spacing-top) var(--header-spacing-left);
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-primary);
    margin-top: 3px; /* Adjusted for status line */
}

.header-title {
    font-size: 1.2em;
    font-weight: 300;
    margin: 0;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

#venue-name {
    font-style: italic;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: var(--spacing-xl);
}

/* Elegant View Switch */
#view-switch {
    background: var(--bg-surface);
    backdrop-filter: blur(8px);
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-primary);
    transition: all var(--animation-normal);
}

#view-switch label {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
    user-select: none;
}

#view-switch input[type="checkbox"] {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--animation-fast);
    position: relative;
    background: var(--bg-secondary);
}

#view-switch input[type="checkbox"]:checked {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

#view-switch input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: -1px;
    left: 2px;
    color: var(--text-inverse);
    font-size: 11px;
    font-weight: 600;
}

/* Main Dashboard */
#venue-dashboard {
    flex: 1;
    padding: var(--spacing-2xl);
    padding-top: 10px;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

/* Remove any conflicting styles that might override user-card layout */
.user-list {
    /* Remove any inherited flex properties that might conflict */
    display: grid;
}

/* Elegant Table Design */
#user-table-container {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-top: var(--spacing-lg);
    border: 1px solid var(--border-primary);
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    will-change: opacity, transform;
}

/* Smooth transitions for user list */
#user-list {
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    will-change: opacity, transform;
}

#user-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    background: transparent;
}

#user-table thead {
    background: var(--bg-tertiary);
}

#user-table thead th {
    padding: var(--spacing-lg) var(--spacing-xl);
    text-align: left;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-primary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

#user-table tbody tr {
    border-bottom: 1px solid var(--border-light);
    transition: all var(--animation-fast);
}

#user-table tbody tr:hover {
    background: var(--bg-tertiary);
}

#user-table tbody td {
    padding: var(--spacing-lg) var(--spacing-xl);
    vertical-align: top;
    color: var(--text-primary);
}

/* Elegant Button Styles */
#user-table tbody td button {
    margin-right: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    border: 2px solid var(--border-primary);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--animation-normal);
    font-size: 0.875rem;
    font-weight: 600;
    background: var(--bg-card);
    color: var(--text-primary);
    min-width: 40px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Benachrichtigungsbutton besonders hervorheben */
#user-table tbody td button[data-action="quickalert"] {
    background: var(--accent-success);
    color: var(--text-inverse);
    border-color: var(--accent-success);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

#user-table tbody td button[data-action="quickalert"]:hover {
    background: #059669;
    border-color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

/* Modal-Button auch sichtbarer */
#user-table tbody td button[data-action="openmodal"] {
    background: var(--accent-warning);
    color: var(--text-inverse);
    border-color: var(--accent-warning);
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
}

#user-table tbody td button[data-action="openmodal"]:hover {
    background: #d97706;
    border-color: #d97706;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
}

/* Remove-Button ebenfalls sichtbarer */
#user-table tbody td button[data-action="remove"] {
    background: var(--accent-danger);
    color: var(--text-inverse);
    border-color: var(--accent-danger);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

#user-table tbody td button[data-action="remove"]:hover {
    background: #dc2626;
    border-color: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Allgemeine Button-Hover-Effekte */
#user-table tbody td button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tr-waitlist-id {
    background: var(--accent-primary);
    color: var(--text-inverse);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    text-align: center;
    font-weight: 600;
    font-size: 1.75rem;
    letter-spacing: -0.01em;
}

.hidden {
    display: none !important;
}


/* Elegant Footer */
footer {
    background: var(--bg-footer);
    color: var(--text-inverse);
    display: flex;
    justify-content: center;
    align-items: center;
    border-top: 1px solid var(--border-primary);
}

footer ul {
    display: flex;
    gap: var(--spacing-lg);
    list-style: none;
}

footer button {
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    transition: all var(--animation-normal);
    display: flex;
    align-items: center;
    justify-content: center;
}

footer button:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

/* Icon innerhalb Footer Buttons klickbar machen */
footer button i {
    pointer-events: none;
    font-size: 24px;
}

/* Standardized Icon Sizes with Dark Mode Support */
footer img {
    width: 24px;
    height: 24px;
    transition: filter 0.3s ease-in-out;
}

footer i {
    color: #fff;
}

/* Status Messages */
#status-message-container {
    position: fixed;
    bottom: var(--spacing-lg);
    right: var(--spacing-lg);
    background: var(--bg-card);
    color: var(--text-primary);
    padding: var(--spacing-sm) var(--spacing-sm);
    border-radius: var(--radius-lg);
    z-index: 9999;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-primary);
    max-width: 320px;
    backdrop-filter: blur(20px);
}


/* Responsive Design */
@media (max-width: 768px) {
    #header {
        flex-direction: column;
        gap: var(--spacing-lg);
        padding: var(--spacing-lg);
    }

    .header-controls {
        width: 100%;
        justify-content: space-between;
    }

    #venue-dashboard {
        padding: var(--spacing-lg);

    }

    #user-table-container {
        overflow-x: auto;
    }

    #user-table {
        min-width: 600px;
    }
}

@media (max-width: 480px) {
    #header {
        padding: var(--spacing-md);
    }

    .header-controls {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    #venue-dashboard {
        padding: var(--spacing-md);
    }
}

@media (max-width: 1024px) {
    #venue-dashboard {
        padding: var(--spacing-xl);
    }
}