/* VARIABLES - 01 - variables.css */

:root {
    --primary: #4da6ff;
    --primary-dark: #0066cc;
    --background: #f4f4f4;
    --text: #333;
    --text-muted: #6b7280;
    --border: #e2e8f0;
    --border-color: #e2e8f0;
    --card-bg: #ffffff;
    --hover-bg: #f8fafc;
    --button-hover: #40b0ff;
    --table-header: var(--primary);
    --table-border: #edf2f7;
    --shadow: rgba(0, 0, 0, 0.1);
    --success-bg: #48bb78;
    --success-text: #ffffff;
    --error-bg: #f56565;
    --error-text: #ffffff;
    --price: #16a34a;
}

[data-theme="dark"] {
    --primary: #80ccff;
    --primary-dark: #40b0ff;
    --background: #0a1019;
    --text: #d1d5db;
    --text-muted: #9ca3af;
    --border: #1a2435;
    --border-color: #1a2435;
    --card-bg: #172033;
    --hover-bg: #243242;
    --button-hover: #0088ff;
    --table-header: #020617;
    --table-border: #4b5563;
    --shadow: rgba(0, 0, 0, 0.3);
    --success-bg: #38a169;
    --success-text: #ffffff;
    --error-bg: #e53e3e;
    --error-text: #ffffff;
    --price: #4ade80;
}

/* ========================================
   TABLE STYLING FIXES FOR LIGHT MODE
   ======================================== */
/* ---- Global sortable table header styles (blue header, both modes) ---- */

/* Base sortable header */
th.sortable { cursor: pointer; user-select: none; }

/* Hover — lighter shade of the dark-blue header */
th.sortable:hover { background: #2a4f7a !important; color: #fff !important; }
[data-theme="dark"] th.sortable:hover { background: #1a2d45 !important; color: #fff !important; }

/* Active sorted column — slightly lighter blue, white text */
th.sortable.sorting-asc,
th.sortable.sorting-desc {
    background: #264a72 !important;
    color: #fff !important;
}
[data-theme="dark"] th.sortable.sorting-asc,
[data-theme="dark"] th.sortable.sorting-desc {
    background: #182840 !important;
    color: #fff !important;
}

/* .sort-indicator style (auction.php compact table) */
th.sortable .sort-indicator {
    display: inline-block;
    margin-left: 4px;
    font-size: 10px;
    opacity: 0.55;
    vertical-align: middle;
}
th.sortable .sort-indicator::before { content: '⇅'; color: rgba(255,255,255,0.75); }
th.sortable:hover .sort-indicator { opacity: 0.8; }
th.sortable:hover .sort-indicator::before { color: #fff; }
th.sortable.sorting-asc .sort-indicator,
th.sortable.sorting-desc .sort-indicator { opacity: 1; }
th.sortable.sorting-asc .sort-indicator::before { content: '↑'; color: #fff; font-weight: 900; }
th.sortable.sorting-desc .sort-indicator::before { content: '↓'; color: #fff; font-weight: 900; }

/* .si style (search.php / auction.php s2-table) */
th.sortable .si { display: inline-block; margin-left: 4px; font-size: 10px; opacity: 0.55; vertical-align: middle; }
th.sortable .si::after { content: '⇅'; color: rgba(255,255,255,0.75); }
th.sortable:hover .si { opacity: 0.8; }
th.sortable.sorting-asc .si,
th.sortable.sorting-desc .si { opacity: 1; }
th.sortable.sorting-asc .si::after { content: '↑'; color: #fff; }
th.sortable.sorting-desc .si::after { content: '↓'; color: #fff; }






/* RESET - 02 - reset.css */

* {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    background-color: var(--background);
    color: var(--text);
    width: 100%;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1,
h2 {
    font-size: 1.2em;
    margin-bottom: 10px;
    margin-left: 10px;
    color: var(--text);
}

.search-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.search-meta {
    display: block;
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-top: 4px;
    margin-left: 10px;
    margin-bottom: 16px;
}

/* Show/hide based on screen size */
.mobile-only {
    display: none !important;
}

.desktop-only {
    display: block;
}



/* LAYOUT - 03 - layout.css */

main {
    flex: 1 0 auto;
}

#search-form {
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    text-align: center;
}

#search-form form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

#search-form.hidden {
    display: none;
}

/* Toggle Link */
.toggle-link {
    display: inline-block;
    margin: 10px 0;
    color: var(--text);
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.toggle-link:hover {
    background-color: var(--hover-bg);
}

/* pagination top */
.pagination-top {
    float: right;
    margin-bottom: 20px;
}

.pagination-top a {
    padding: 8px 12px;
    margin: 0 5px;
    text-decoration: none;
    border: 1px solid var(--border);
    color: var(--text);
}

.pagination-top a.active {
    background-color: var(--primary);
    color: white;
}

.pagination-top a:hover {
    background-color: var(--hover-bg);
}

/* pagination bottom */
.pagination {
    margin-top: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.pagination-active {
    padding: 8px 8px;
    min-width: 20px;
    display: inline-block;
    text-align: center;
    border: 1px solid var(--text);
    font-weight: bold;
    color: var(--text);
}

.pagination a {
    padding: 8px 8px;
    margin: 0 5px;
    text-decoration: none;
    border: 1px solid var(--border);
    color: var(--text);
}

.pagination a.active {
    background-color: var(--primary);
    color: white;
}

.pagination a:hover {
    background-color: var(--hover-bg);
}

/* Preferences Layout */
#content {
    margin-top: 10px;
    margin-bottom: 10px;
}

/* Only apply height constraints on preferences page */
body:has(.preferences-container) #content {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 220px);
    max-height: calc(100vh - 220px);
    overflow: hidden;
}

.preferences-container {
    display: flex;
    padding: 12px;
    flex: 1;
    overflow: hidden;
    max-height: 100%;
}

.preferences-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: var(--card-bg);
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 4px var(--shadow);
    height: fit-content;
    align-self: flex-start;
}


.preferences-sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.preferences-sidebar .nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    color: var(--text);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.preferences-sidebar .nav-item:hover {
    background: var(--border);
}

.preferences-sidebar .nav-item.active {
    background: var(--primary);
    color: white;
}

/* Admin Sidebar (same styling as preferences sidebar) */
.admin-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: var(--card-bg);
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 4px var(--shadow);
    height: fit-content;
    align-self: flex-start;
}

.admin-sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.admin-sidebar .nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    color: var(--text);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.admin-sidebar .nav-item:hover {
    background: var(--border);
}

.admin-sidebar .nav-item.active {
    background: var(--primary);
    color: white;
}

.admin-content {
    flex: 1;
    margin-left: 12px;
    display: flex;
    flex-direction: column;
}

/* Admin container layout */
body:has(.admin-container) #content {
    display: flex;
    flex-direction: column;
}

.admin-container {
    display: flex;
    padding: 12px;
    flex: 1;
}

.preferences-content {
    flex: 1;
    margin-left: 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    max-height: 100%;
}

#folderContentsPane {
    display: none;
    flex: 1;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    min-height: 0;
}

#folderContentsPane.active {
    display: flex;
}

#folderContents {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    min-height: 0;
}

.preferences-content>.section {
    flex: 1;
    overflow: hidden;
}

/* Override overflow for profile and subscription sections */
.preferences-content>#profile.section {
    overflow-y: auto !important;
    max-height: calc(100vh - 250px) !important;
    height: auto !important;
}

.preferences-content>#subscription.section {
    overflow-y: auto !important;
    height: auto !important;
    max-height: calc(100vh - 250px) !important;
    flex: 0 1 auto !important; /* hug content instead of stretching to fill viewport */
}

.preferences-content::-webkit-scrollbar {
    width: 6px;
}

.preferences-content::-webkit-scrollbar-track {
    background: transparent;
}

.preferences-content::-webkit-scrollbar-thumb {
    background-color: var(--border);
    border-radius: 3px;
}

.section {
    display: none !important;
}

.section.active {
    display: block !important;
    height: 100%;
}

#profile.section.active {
    height: auto !important;
    max-height: calc(100vh - 250px) !important;
}

#subscription.section.active {
    height: auto !important;
    max-height: calc(100vh - 250px) !important;
    overflow-y: auto !important;
}

#profile.section {
    padding: 20px;
    width: fit-content;
    max-width: 600px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 2px 4px var(--shadow);
    max-height: calc(100vh - 250px);
    overflow-y: auto;
    height: auto;
}

#subscription.section {
    padding: 20px;
    width: fit-content;
    max-width: 600px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 2px 4px var(--shadow);
    height: auto;
    max-height: calc(100vh - 250px);
    overflow-y: auto;
}

/* Reusable subscribe CTA for locked values */
.subscribe-cta {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--primary);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.subscribe-cta:hover {
    background: var(--primary-dark);
    color: #ffffff;
}

.price-locked {
    color: inherit;          /* same color as other rows */
    font-size: inherit;      /* match row font-size */
    font-weight: inherit;    /* same weight as other cells */
    text-decoration: none;   /* remove underline by default */
    cursor: pointer;
    padding: 0;
    margin: 0;
}

.price-locked-tile { 

    text-decoration: none;
    font-size: 1.2em;
    font-weight: bold;
}

.price-locked:hover {
    text-decoration: underline;   /* subtle hover so user knows it's clickable */
}





/* Custom scrollbar for subscription section */
#subscription.section::-webkit-scrollbar {
    width: 8px;
}

#subscription.section::-webkit-scrollbar-track {
    background: var(--background);
    border-radius: 4px;
}

#subscription.section::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

#subscription.section::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Custom scrollbar for profile section */
#profile.section::-webkit-scrollbar {
    width: 8px;
}

#profile.section::-webkit-scrollbar-track {
    background: var(--background);
    border-radius: 4px;
}

#profile.section::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

#profile.section::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.subscription-info {
    width: fit-content;
}

.subscription-actions {
    width: fit-content;
}

/* Make tables in profile and subscription fit content */
#profile.section table,
#subscription.section table {
    width: fit-content;
    max-width: 100%;
}


/* Two Pane Layout */
.two-pane-layout {
    display: flex;
    gap: 10px;
    background: var(--background);
    flex: 1;
    overflow: hidden;
    position: relative;
    z-index: 0;
}

.folder-list-pane {
    width: 30%;
    min-width: 250px;
    max-width: 350px;
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    max-height: 100%;
}

.folder-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
    min-height: 0;
}

.folder-list::-webkit-scrollbar {
    width: 6px;
}

.folder-list::-webkit-scrollbar-track {
    background: transparent;
}

.folder-list::-webkit-scrollbar-thumb {
    background-color: var(--border);
    border-radius: 3px;
}


.folder-list-pane>.folder-header {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    height: auto;
}

#folderContentsPane>.folder-header {
    padding: 8px;
    border-bottom: 1px solid var(--border);
    background: var(--primary);
    color: white;
}

#folderContentsPane>.folder-header h3 {
    margin: 0;
    font-size: 1.1em;
}

.folder-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.add-folder-btn,
.delete-folders-btn,
.select-folders-btn,
.cancel-bulk-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-folder-btn:hover {
    background: rgba(34, 197, 94, 0.1);
}

.delete-folders-btn:hover {
    background: rgba(229, 62, 62, 0.1);
}

.bulk-actions {
    display: none;
    gap: 4px;
}


.folder-controls {
    padding: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.sort-controls {
    display: flex;
    gap: 10px;
}

.sort-controls select {
    width: auto;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--background);
    color: var(--text);
}

/* Compact sort controls on mobile */
@media (max-width: 768px) {

    /* Only when the sort controls are actually shown in grid view */
    .sort-controls.show-in-grid {
        padding: 6px 8px;
        margin-bottom: 8px;
        gap: 6px;
        flex-wrap: wrap;
        background: transparent;
        /* a little lighter */
    }

    /* Hide the "Sort by:" label to save space */
    .sort-controls.show-in-grid label {
        display: none;
    }

    /* Make the two dropdowns sit side-by-side and smaller */
    .sort-controls.show-in-grid .sort-select {
        flex: 1 1 calc(50% - 4px);
        min-width: 0;
        font-size: 0.85rem;
        padding: 6px 8px;
    }
}



#loadingIndicator {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(2px);
}

.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* Folder Item Styles */
.folder-item {
    margin-bottom: 4px;
}

.folder-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px;
    border-radius: 4px;
    background: var(--background);
    transition: all 0.2s ease;
}

.folder-header:hover {
    background: var(--border);
}

.folder-header.active {
    background: var(--primary);
    color: white;
}

.folder-header.active .folder-actions .icon-btn {
    color: white;
    opacity: 0.8;
}

.folder-header.active .folder-actions .icon-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}


.folder-info {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    flex-grow: 1;
    min-width: 0;
}

.folder-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    max-width: 150px;
}

.folder-name[data-name]:hover::after {
    content: attr(data-name);
    position: absolute;
    background: var(--card-bg);
    padding: 8px;
    border-radius: 4px;
    border: 1px solid var(--border);
    z-index: 1000;
    top: 100%;
    left: 0;
    white-space: normal;
    max-width: 300px;
    box-shadow: 0 2px 4px var(--shadow);
}

.folder-checkbox {
    display: none;
    margin-right: 8px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.bulk-delete-mode .folder-checkbox {
    display: block;
}

.bulk-delete-mode .folder-item {
    cursor: pointer;
}

.bulk-delete-mode .folder-info {
    pointer-events: none;
}

.bulk-delete-mode .folder-actions {
    display: none;
}

.item-count {
    color: var(--text-muted);
    font-size: 0.9em;
    margin-right: 8px;
}

/* List/Grid View Styles */
.list-view .item {
    display: flex;
    gap: 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 10px;
    padding: 12px;
    background: var(--card-bg);
    transition: all 0.2s ease;
}

.list-view .item:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 4px var(--shadow);
    transform: translateY(-1px);
}

.list-view .item img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    background: var(--background);
    border-radius: 4px;
}

.list-view .item-details {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    min-width: 0;
    /* Enable text truncation */
}

.list-view .item-details h4 {
    margin: 0 0 8px 0;
    font-size: 1.1em;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.list-view .item-details p {
    margin: 4px 0;
    color: var(--text-muted);
    font-size: 0.9em;
}

.grid-view {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 0.75rem;
}

/* Better responsive breakpoints */
@media (max-width: 1400px) {
    .grid-view {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }
}

@media (max-width: 1200px) {
    .grid-view {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

@media (max-width: 900px) {
    .grid-view {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
}

@media (max-width: 768px) {
    .grid-view {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 10px 0;
    }

    /* Reduce padding on mobile */
    .grid-details {
        padding: 10px;
    }

    .grid-title {
        font-size: 0.95em;
    }

    .grid-description {
        font-size: 0.85em;
    }
}

@media (max-width: 500px) {
    .grid-view {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }

    .results-container {
        padding: 12px 1% 0 !important;
    }
}

.grid-image {
    border-radius: 0 !important;
}

.grid-image img {
    border-radius: 0 !important;
}

/* Subscription Styles */
.subscription-info {
    max-width: 600px;
    width: 100%;
}

.subscription-actions {
    margin-top: 30px;
    display: flex;
    gap: 20px;
}

.cancel-subscription {
    color: #e53e3e;
    text-decoration: none;
    padding: 12px 24px;
    border: 2px solid #e53e3e;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.cancel-subscription:hover {
    background-color: #e53e3e;
    color: white;
}

.upgrade-plan {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upgrade-plan:hover {
    background-color: var(--button-hover);
}

/* Billing Portal Styles */
.subscription-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
}

.subscription-card.active {
    border-left: 4px solid #48bb78;
}

.subscription-card.canceled {
    border-left: 4px solid #f59e0b;
}

.subscription-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.subscription-header h3 {
    margin: 0;
    font-size: 1.5em;
    color: var(--text);
}

.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.active {
    background: #c6f6d5;
    color: #22543d;
}

.status-badge.canceled {
    background: #fed7aa;
    color: #7c2d12;
}

.subscription-details {
    margin-bottom: 24px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f7fafc;
}

.detail-row .label {
    color: var(--text-muted);
    font-weight: 500;
}

.detail-row .value {
    color: var(--text);
    font-weight: 600;
}

.detail-row.canceled {
    background: #fff5f5;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #feb2b2;
}

.btn-portal {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: #635bff;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(99, 91, 255, 0.2);
}

.btn-portal:hover {
    background: #4f46e5;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(99, 91, 255, 0.3);
}

.portal-help-text {
    margin-top: 12px;
    font-size: 0.9em;
    color: var(--text-muted);
}

.btn-primary {
    display: inline-block;
    padding: 14px 24px;
    background: #3182ce;
    color: white;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: #2c5282;
}

[data-theme="dark"] .detail-row.canceled {
    background: rgba(254, 178, 178, 0.1);
}

.grid-view .item {
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 10px;
    background: var(--card-bg);
    display: flex;
    flex-direction: column;
}

.grid-view .item img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    margin-bottom: 1rem;
    background: var(--background);
}





/* FORMS - 04 - forms.css */

/* Form Elements */
input[type="text"],
input[type="password"],
input[type="email"] {
    font-size: 1em;
    padding: 12px 16px;
    margin-right: 10px;
    border: 2px solid var(--border);
    border-radius: 8px;
    width: 300px;
    transition: all 0.3s ease;
    color: var(--text);
    background-color: var(--card-bg);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--shadow);
}

button {
    cursor: pointer;
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

button:hover {
    background-color: var(--button-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 12px var(--shadow);
}

button:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Search Bar Styles */
.search-container form {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
}

.search-container input[type="text"] {
    width: 400px;
    max-width: calc(100% - 80px);
    background-color: var(--card-bg);
    padding: 10px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    margin-right: 0;
    height: 48px;
    box-sizing: border-box;
}

.search-container button {
    height: 48px;
    padding: 6px 10px;
    margin-left: 10px;
    display: flex;
    align-items: center;
    background-color: #80ccff;
    border: none;
    border-radius: 8px;
    box-sizing: border-box;
}

.search-container button:hover {
    background-color: #0088ff;
}

.search-container button img {
    height: 40px;
}

.search-container button span {
    font-size: 22px;
    font-weight: bold;
    margin-left: 2px;
}

/* Preferences Form Styles */
.preferences-form {
    width: fit-content;
    min-width: 300px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    font-weight: 500;
    font-size: 0.95em;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    max-width: 500px;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text);
    font-size: 1em;
    transition: all 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--shadow);
    outline: none;
}

.form-group input[readonly] {
    background-color: var(--border);
    cursor: not-allowed;
}

/* Select and Textarea Dark Mode Fix */
.form-group select,
.form-group textarea {
    width: 100%;
    max-width: 500px;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text);
    font-size: 1em;
    transition: all 0.3s ease;
}

.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--shadow);
    outline: none;
}

.form-group select {
    cursor: pointer;
}

.form-group select option {
    background: var(--card-bg);
    color: var(--text);
}

/* Global dark-mode fix for all select dropdowns (option elements inherit white bg by default) */
[data-theme="dark"] select option {
    background: var(--card-bg);
    color: var(--text);
}

.password-requirements {
    margin-bottom: 15px;
    padding: 12px 13px;
    background-color: var(--background);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.9em;
}

.password-requirements ul {
    list-style: none;
    padding: 0;
    margin: 0;
    color: var(--text-muted);
}

.password-requirements li {
    margin: 5px 0;
    padding-left: 20px;
    position: relative;
}

.password-requirements li:before {
    content: "•";
    position: absolute;
    left: 5px;
    color: var(--primary);
}

.password-input-container {
    position: relative;
    display: inline-block;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text);
    opacity: 0.85;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    padding: 4px;
    border-radius: 4px;
}

.toggle-password:hover {
    opacity: 1;
    background: var(--border);
}

.save-button {
    margin-top: 5px;
    width: 100%;
    padding: 14px;
    font-size: 1em;
    font-weight: 500;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.save-button:hover {
    background: var(--button-hover);
}

.save-button.disabled {
    cursor: not-allowed;
    background: var(--border);
    border: 2px solid var(--border);
    color: var(--text-muted);
}

/* Enhanced contrast for save button in light mode */
:root .save-button {
    background: #0066cc;
    box-shadow: 0 2px 4px rgba(0, 102, 204, 0.3);
}

:root .save-button:hover {
    background: #0052a3;
    box-shadow: 0 4px 8px rgba(0, 102, 204, 0.4);
}

:root .save-button.disabled {
    background: #d1d5db;
    border: 2px solid #d1d5db;
    color: #6b7280;
    box-shadow: none;
}

/* Enhanced contrast for save button in dark mode */
[data-theme="dark"] .save-button {
    background: #40b0ff;
    box-shadow: 0 2px 4px rgba(64, 176, 255, 0.3);
}

[data-theme="dark"] .save-button:hover {
    background: #0088ff;
    box-shadow: 0 4px 8px rgba(64, 176, 255, 0.4);
}

[data-theme="dark"] .save-button.disabled {
    background: #374151;
    border: 2px solid #374151;
    color: #6b7280;
    box-shadow: none;
}

/* Folder Form Styles */
.folder-actions button {
    height: 28px;
    line-height: 1;
    padding: 0 10px;
}

.folder-actions .icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.folder-actions .edit-btn {
    color: #3182ce;
    opacity: 0.8;
}

.folder-actions .edit-btn:hover {
    opacity: 1;
    background: rgba(49, 130, 206, 0.1);
}

.folder-actions .delete-btn {
    color: #e53e3e;
    opacity: 0.8;
}

.folder-actions .delete-btn:hover {
    opacity: 1;
    background: rgba(229, 62, 62, 0.1);
}

/* Dark mode adjustments */
[data-theme="dark"] .folder-actions .edit-btn {
    color: #63b3ed;
}

[data-theme="dark"] .folder-actions .delete-btn {
    color: #fc8181;
}





/* TABLES - 05 - tables.css */


/* Table Styles */
.table-1 {
    width: 100%;
    margin: 0;
    padding: 0;
}

.table-1 h1 {
    margin-top: 20px;
}

.search-results-header {
    margin: 20px 2.5%;
    font-size: 1.1em;
    color: var(--text);
}

.search-results-header strong {
    font-weight: 600;
}

.table-1 table {
    border-collapse: collapse;
    margin-top: 20px;
    background-color: var(--card-bg);
    width: 100%;
    box-shadow: 0 2px 4px var(--shadow);
    border-radius: 8px;
    overflow: hidden;
    table-layout: fixed;
}

.table-1 th {
    background-color: var(--table-header);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9em;
    padding: 16px;
    position: sticky;
    top: 0;
}

.table-1 td {
    padding: 12px 16px;
    color: var(--text);
    font-size: 0.95em;
    white-space: nowrap;
    overflow: hidden;
}


.table-1 tr:hover td {
    background-color: var(--hover-bg);
    transition: background-color 0.2s ease;
}

.no-wrap {
    white-space: nowrap;
}

/* Thumbnail column styling for list view */
.thumbnail-col {
    width: 60px;
    text-align: center;
    vertical-align: middle;
    padding: 8px 4px;
}

.list-thumbnail {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    background: var(--background);
    display: block;
    margin: 0 auto;
}

/* Blur effect for non-subscribers (CSS-only, replaces server-side GD blur) */
.blur-image {
    filter: blur(12px);
    -webkit-filter: blur(12px);
    transition: filter 0.3s ease;
}

/* Slightly lighter blur for smaller list thumbnails */
.list-thumbnail.blur-image {
    filter: blur(8px);
    -webkit-filter: blur(8px);
}

/* Compact table view - tighter spacing, no thumbnails */
.table-compact table {
    margin-top: 8px;
    table-layout: auto;
}

.table-compact th {
    padding: 8px 10px;
    font-size: 0.8em;
}

.table-compact td {
    padding: 4px 10px;
    font-size: 0.85em;
}

.table-compact tr:hover td {
    background-color: var(--hover-bg);
}

.table-compact .checkbox-col {
    width: 20px;
    min-width: 20px;
    padding: 2px 8px;
}

.table-compact .col1 { width: 50px; }   /* Date */
.table-compact .col4 { width: 55px; }   /* Year */
.table-compact .col5 { width: 90px; }  /* Make */
.table-compact .col6 { width: 80px; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }  /* Model - truncate */
.table-compact .col7 { width: 320px; max-width: 320px; } /* Description - wider */
.table-compact .col8 { width: 100px; }  /* Price */

.table-compact .truncate {
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* HEADER - 06 - header.css */


/* Header Styles */
.site-header {
    background-color: var(--card-bg);
    box-shadow: 0 2px 5px var(--shadow);
    width: 100%;
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    width: 100%;
    align-items: center;
    padding: 0 1.5%;
    justify-content: space-between;
}

/* Add spacing to prevent content from hiding under fixed header */
body {
    padding-top: 130px;
}

.logo {
    padding: 15px 0;
    margin: 0;
    display: flex;
    align-items: center;
}

.logo img {
    /*height: 90px;*/
    height: 80px;
    transition: opacity 0.3s;
}

.logo img:hover {
    opacity: 0.8;
}

/* Navigation and Search */
.nav-search-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 15px 0 15px 0;
    margin-left: auto;
}

.main-nav {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-bottom: 15px;
}

.search-container {
    display: flex;
    justify-content: flex-end;
    margin-top: 5px;
}

.search-container.align-right {
    justify-content: flex-end;
}

.search-container input[type="text"] {
    width: 250px;
    background-color: var(--card-bg);
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background-color: var(--hover-bg);
}

.nav-link {
    color: var(--text);
    text-decoration: none;
    font-size: 1em;
    font-weight: 500;
    padding: 4px 16px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
}

.nav-link:hover {
    background-color: var(--hover-bg);
}

/* Header responsive design /*
/* Smaller logo on mobile */
@media (max-width: 768px) {

    /* MOBILE: Header should NOT be fixed */
    .site-header {
        /*position: static !important;*/   /* Removes fixed placement */
    }

    body {
        /*padding-top: 0 !important;*/     /* Remove the fake offset */
    }

    /* end - not fixed header for mobile */

    .logo img {
        height: 60px;
    }

    .logo {
        padding: 10px 0;
    }

    /* FIX: Make header container wrap properly */
    .header-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    /* Logo row with search icon */
    .logo-search-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding: 0;
    }
    
    .mobile-only {
        display: inline-flex !important;
    }
    
    .desktop-only {
        display: none !important;
    }
    
    /* Navigation goes below logo row */
    .nav-search-container {
        width: 100%;
        margin-left: 0;
        padding: 0 0 10px 0;
    }

    .main-nav {
        justify-content: flex-start;
        margin-bottom: 0;
    }

    /* Make mobile search icon bigger */
    #mobile-search-btn {
        margin-right: 15px !important;
    }

    #mobile-search-btn svg {
        width: 28px !important;
        height: 28px !important;
    }

}




/* FOOTERS - 07 - footer.css */


/* Footer Styles */
html {
    height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.site-footer {
    margin-top: auto;
    width: 100%;
    background-color: var(--card-bg);
    color: var(--text);
    padding: 20px;
    text-align: center;
    font-size: 0.9em;
    box-shadow: 0px -2px 5px var(--shadow);
    flex-shrink: 0;
}

.footer-nav a,
.footer-social a {
    color: var(--text);
    text-decoration: none;
    margin: 0 0px;
    padding: 4px 0px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.footer-nav a:hover,
.footer-social a:hover {
    background-color: var(--hover-bg);
}


/* ================================
   NEW FOOTER — LAYOUT + DARK MODE
   ================================ */

.site-footer h1,
.site-footer h2,
.site-footer h3,
.site-footer h4,
.site-footer h5,
.site-footer h6 {
    margin-left: 0 !important;
}


.site-footer {
    margin-top: auto;
    width: 100%;
    background-color: var(--card-bg);
    color: var(--text);
    padding: 40px 20px 25px;
    box-shadow: 0px -2px 5px var(--shadow);
    font-size: 0.95rem;
    flex-shrink: 0;
    text-align: left;
    /* <-- add this */
}

/* Main footer container */
.footer-container {
    max-width: 1300px;
    margin: 0 auto 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 35px;
}

/* Shift link columns to the right */
.footer-brand {
    margin-right: auto;
}



/* ----- Columns ----- */
/* Brand stays on the left */
.footer-brand {
    flex: 0 0 300px;
    /* fixed-ish width */
    min-width: 240px;
}

/* Logo row: icon + BidSeek text */
.footer-logo-wrap {
    display: flex;
    align-items: center;
    /* THIS vertically centers image + text */
    gap: 10px;
}

/* Logo image */
.footer-logo-img {
    width: 200px;
    height: 120px;
    object-fit: contain;
}

/* BidSeek text */
.footer-logo {
    margin: 0;
    padding: 0;
    font-size: 1.6rem;
    font-weight: 700;
    /* optional, matches your screenshot style */
    color: var(--text);

    line-height: 1;
    display: flex;
    align-items: center;

    position: relative;
    top: -2px;
    /* <-- This lifts the text perfectly */
}




/* Link columns on the right */
.footer-links {
    flex: 0 0 190px;
    /* each link column ~190px (3 columns) */
    min-width: 160px;
}


/* ----- Branding ----- */
.footer-logo {
    font-size: 1.6rem;
    /*margin-bottom: 0.4rem;*/
    margin-top: 0.4rem;
    color: var(--text);
}

.footer-tagline {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* ----- Section Headings ----- */
.footer-heading {
    font-size: 1.05rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text);
}

/* ----- Navigation Links ----- */
.footer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav li {
    margin-bottom: 0.5rem;
}

.footer-nav a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.15s ease-in-out;
}

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

/* ----- Social Icons ----- */
.social-icons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.social-icons a {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text);
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
    font-size: 0.9rem;
    margin: 0;
    /* <-- add this */
    padding: 0;
    /* <-- and this */
}

.social-icons a:hover {
    background-color: var(--hover-bg);
    color: var(--primary);
    border-color: var(--primary);
}

/* ----- Footer Bottom Bar ----- */
.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 15px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ----- Responsive Footer ----- */
@media (max-width: 900px) {
    .footer-container {
        flex-direction: column;
        gap: 25px;
        margin: 0px;
    }

    .footer-brand,
    .footer-links,
    .footer-social {
        min-width: unset;
        flex: 1 1 100%;
    }
}

/* light mode footer settings /*

/* LIGHT MODE FOOTER OVERRIDE */
/* LIGHT MODE FOOTER OVERRIDE — use lighter site blue */
:root .site-footer {
    background-color: var(--primary);
    /* #4da6ff */
    color: #ffffff;
}

/* Make headings, logo, and tagline white */
:root .footer-logo,
:root .footer-heading,
:root .footer-tagline {
    color: #ffffff;
}

/* Footer nav links in white */
:root .footer-nav a {
    color: #ffffff;
}

:root .footer-nav a:hover {
    background-color: rgba(0, 0, 0, 0.15);
    color: #ffffff;
}

/* Social icons: white icons with light border */
:root .social-icons a {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.6);
}

:root .social-icons a:hover {
    background-color: rgba(0, 0, 0, 0.15);
    color: #ffffff;
    border-color: #ffffff;
}

/* Footer bottom bar */
:root .footer-bottom {
    border-top-color: rgba(255, 255, 255, 0.35);
    color: #f8f9fa;
}

[data-theme="dark"] .site-footer {
    background-color: var(--card-bg);
    color: var(--text);
}

/* responsive footer */

/* Mobile footer slim links */
.footer-mobile-links {
    display: none;
    gap: 18px;
    margin: 10px 0;
}

/* Mobile footer brand label */
.footer-mobile-brand {
    display: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    text-align: center;
    margin-bottom: 10px;
}

/* MOBILE MODE */
@media (max-width: 900px) {

    /* Hide full desktop link columns */
    .footer-links {
        display: none;
    }

    /* Show small centered mobile links */
    .footer-mobile-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        /* <-- centers the links */
        text-align: center;
        /* <-- keeps them centered if they wrap */
        width: 100%;
    }

    .footer-mobile-links a {
        color: #fff;
        font-size: 0.9rem;
        text-decoration: none;
        margin: 4px 10px;
    }

    /* Center everything else on mobile */
    .site-footer {
        padding: 18px;
        text-align: center;
    }

    .footer-brand {
        text-align: center;
        display: none;
    }

    .footer-mobile-brand {
        display: block;
    }

    .footer-tagline {
        font-size: 0.82rem;
        margin-bottom: 12px;
    }

    .footer-bottom {
        margin-top: 10px;
        padding-top: 8px;
        font-size: 0.75rem;
    }
}

@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

.hide {display: none !important;}



/* RESPONSIVE - 08 - responsive.css */

/* Responsive Design */
@media (max-width: 768px) {

    /* Increase body padding to account for taller mobile header */
    body {
        padding-top: 120px;
    }

    /* Extra padding for pages with search bar (search.php, auction.php, folders) */
    body[data-pagetype="searchpage"] {
        /*padding-top: 260px;*/
    }

    /* Fix preferences page height calculation for mobile */
    body:has(.preferences-container) #content {
        min-height: auto;
        max-height: none;
        overflow: visible;
    }

    .preferences-container {
        flex-direction: column;
        overflow: visible;
        max-height: none;
    }

    .preferences-sidebar {
        width: 100%;
        margin-bottom: 12px;
        padding: 8px;
    }

    /* Horizontal scrolling nav strip on mobile — keeps sidebar under ~60px tall */
    .preferences-sidebar nav {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 6px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .preferences-sidebar nav::-webkit-scrollbar { display: none; }
    .preferences-sidebar .nav-item {
        padding: 8px 12px;
        flex-shrink: 0;
        white-space: nowrap;
        font-size: 0.85rem;
    }
    .preferences-sidebar nav div[style*="border-top"] {
        display: none;
    }

    .preferences-content {
        margin-left: 0;
        width: 100%;
    }

    /* Let sections expand so the page (not the section) scrolls on mobile */
    .preferences-content > .section,
    .preferences-content > #profile.section,
    .preferences-content > #subscription.section,
    #nameplate-results.section.active,
    #vin-results.section.active {
        overflow: visible !important;
        max-height: none !important;
        height: auto !important;
    }

    /* Fix admin page height calculation for mobile */
    body:has(.admin-container) #content {
        min-height: auto;
        max-height: none;
        overflow: visible;
    }

    .admin-container {
        flex-direction: column;
        overflow: visible;
        max-height: none;
    }

    .admin-sidebar {
        width: 100%;
        margin-bottom: 12px;
    }

    .admin-content {
        margin-left: 0;
        width: 100%;
    }

    /* Make folder panes stack vertically on mobile */
    .two-pane-layout {
        flex-direction: column;
        overflow: visible;
        max-height: none;
    }

    .folder-list-pane {
        width: 100%;
        max-width: 100%;
        min-width: 100%;
        margin-bottom: 12px;
        max-height: 300px;
    }

    #folderContentsPane {
        width: 100%;
        min-height: 400px;
        overflow-x: auto;
    }

    #folderContents {
        overflow-x: auto;
        width: 100%;
    }

    /* Make grid and list views scrollable on mobile */
    .grid-view,
    .list-view {
        overflow-x: auto;
        width: 100%;
    }

    /* Force proper grid layout on mobile */
    .grid-view.active {
        grid-template-columns: repeat(2, 1fr) !important;
    }


}

@media (max-width: 500px) {
    .grid-view.active {
        grid-template-columns: 1fr !important;
    }
}


/* UTILITIES - 09 - utilities.css */


/* Utility Classes */
.hidden {
    display: none;
}

.no-wrap {
    white-space: nowrap;
}


/* Loading Spinner */
.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Notification Styles */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 24px;
    border-radius: 8px;
    background: var(--success-bg, rgba(40, 167, 69, 0.9));
    color: white;
    z-index: 9999;
    animation: slideIn 0.3s ease-out;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-height: 60px;
    display: flex;
    align-items: center;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Message Styles */
.success-message {
    background-color: rgba(72, 187, 120, 0.1);
    color: #48bb78;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
}

.error-message {
    background-color: rgba(229, 62, 62, 0.1);
    color: #e53e3e;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
}

/* Alert Styles */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 8px;
}

.alert-danger {
    background-color: rgba(229, 62, 62, 0.1);
    border-color: rgba(229, 62, 62, 0.2);
    color: #e53e3e;
}

.alert-warning {
    background-color: rgba(236, 201, 75, 0.1);
    border-color: rgba(236, 201, 75, 0.2);
    color: #b7791f;
}

.alert strong {
    display: block;
    margin-bottom: 5px;
}

/* Text Truncation and Tooltip */
.truncate-2-lines {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    position: relative;
}





/* SEARCH - 10 - search.css */


/* Pagination Styles */
.pagination,
.pagination-top {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}


/* results toolbar */
.results-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 6px;
}

.results-toolbar .sort-controls {
    margin-right: auto;        /* pushes view buttons to the right */
}



/* Clean minimal pagination buttons */
.pagination a,
.pagination-top a {
    cursor: pointer;
    background-color: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: normal;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    min-width: 32px;
    transition: border-color 0.2s, color 0.2s;
}

.pagination a:hover,
.pagination-top a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination a:active,
.pagination-top a:active {
    transform: none;
    box-shadow: none;
}

.pagination span,
.pagination-top span {
    min-width: 32px;
    padding: 6px 0;
    text-align: center;
    display: inline-block;
    color: var(--text);
}

.pagination span.pagination-active {
    background-color: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 4px;
    font-weight: normal;
    padding: 6px 12px;
    min-width: 32px;
    text-align: center;
    display: inline-block;
}






/* MODAL - 11 - modal.css */


/* Modal styles */
.modal {
    z-index: 2000 !important;
}

.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5) !important;
    z-index: 1999 !important;
}

.modal-backdrop.show {
    opacity: 0.5 !important;
}

.modal-dialog {
    margin: 1.75rem auto;
    max-width: 500px;
}

.modal-content {
    background: var(--card-bg) !important;
    color: var(--text) !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 0.75rem !important;
}

.modal-title {
    font-size: 24px !important;
    font-weight: 600 !important;
}

.modal-header {
    border: none !important;
    padding: 0.75rem 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.modal-footer {
    border: none !important;
    padding: 0.75rem 0 0 !important;
    display: flex !important;
    justify-content: flex-end !important;
    gap: 0.5rem !important;
}

.modal-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.modal-logo-image {
    height: 50px;
    transition: opacity 0.3s;
}

.modal-logo-image:hover {
    opacity: 0.8;
}

.modal-logo-image.hidden {
    display: none;
}

/* Image Modal */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.image-modal.active {
    display: flex;
}

.image-modal-content {
    max-height: 90vh;
    max-width: 90vw;
    object-fit: contain;
}

.modal-loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    z-index: 2002;
}

.close-button {
    position: fixed;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.nav-button {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    background: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.prev-button {
    left: 30px;
}

.next-button {
    right: 30px;
}

/* Modal Form */
#newFolderForm {
    padding: 1rem !important;
}

#newFolderForm .form-control {
    margin-bottom: 1rem !important;
}

.form-control {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--card-bg);
    color: var(--text);
}





/* SELECTION - 12 - selection.css */


/* Selection Controls - Desktop (no wrapping) */
.selection-controls {
    position: relative; /* Changed from sticky - homepage doesn't need sticky */
    background: var(--bg);
    padding: 1rem;
    border-bottom: none;
    z-index: 100;
    display: flex;
    flex-wrap: nowrap; /* CHANGE: Don't wrap on desktop */
    justify-content: center;
    gap: 1rem;
    align-items: center;
}

/* Make selection controls sticky only on search/results pages */
body[data-pagetype="searchpage"] .selection-controls {
    position: sticky;
    top: 0;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .selection-controls {
        flex-wrap: wrap; /* NOW allow wrapping on mobile */
        gap: 0.5rem;
        padding: 0.75rem;
    }
    
    .selection-controls .btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .selection-controls svg {
        width: 14px;
        height: 14px;
        margin-right: 4px;
    }
}

/* For very small screens - make buttons 2x2 grid */
@media (max-width: 480px) {
    .selection-controls {
        gap: 8px;
        padding: 10px;
    }
    
    .selection-controls .btn {
        flex: 0 0 calc(50% - 4px);
        justify-content: center;
        font-size: 0.8em;
        padding: 8px 10px;
    }
}

/* Select All Label */
.select-all-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
    color: var(--text);
}

/* Checkbox styling */
.item-checkbox {
    width: 1.2rem;
    height: 1.2rem;
    cursor: pointer;
}

/* Grid view checkbox position */
.grid-view .item-checkbox {
    /*position: absolute;*/
    top: 0.5rem;
    left: 0.5rem;
    z-index: 1;
}

/* List view checkbox position */
.list-view .item-checkbox {
    margin: 0 0.5rem;
}

/* Batch action buttons */
.batch-action {
    transition: opacity 0.3s ease;
}

.batch-action:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Modal theme overrides */
.modal-content {
    background: var(--card-bg);
    color: var(--text);
    border-color: var(--border-color);
}

.modal-header {
    border-color: var(--border-color);
}

.modal-footer {
    border-color: var(--border-color);
}

.close {
    color: var(--text);
}

.close:hover {
    color: var(--text-muted);
}

.folder-list-group {
    max-height: 300px;
    overflow-y: auto;
}

.list-group-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    padding: 0.75rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text);
    transition: background-color 0.2s ease;
}

.list-group-item:hover {
    background: var(--hover-bg);
}

.list-group-item input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

.list-group-item .badge {
    margin-left: auto;
    background: var(--border-color);
    color: var(--text);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
}


/* Mobile button label swapping */
.label-mobile {
    display: none;
}

@media (max-width: 768px) {
    .label-desktop {
        display: none;
    }

    .label-mobile {
        display: inline;
    }

    /* Optional: tighten button padding on mobile */
    .selection-controls .btn {
        padding: 10px 14px;
        font-size: 0.85rem;
    }
}


/* Form styling */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.form-control {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--card-bg);
    color: var(--text);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.1);
}

/* Button styling */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--border-color);
    color: var(--text);
}

.btn-secondary:hover {
    background: var(--hover-bg);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* New folder form */
#newFolderForm {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: 1rem;
}

/* Selection highlight */
.selected-item {
    background-color: var(--selection-bg);
}

/* Notification */
.notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem;
    background: var(--success-bg);
    color: var(--success-text);
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}
/* ========================================
   COMPACT MODE FOR USER-FACING PAGES
   ======================================== */

/* Compact Mode Toggle Styles */
.compact-mode-container-prefs {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.compact-mode-toggle-prefs {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.compact-mode-toggle-prefs input[type="checkbox"] {
    display: none;
}

.compact-mode-slider-prefs {
    position: relative;
    width: 40px;
    height: 20px;
    background-color: #ccc;
    border-radius: 20px;
    transition: background-color 0.3s;
}

.compact-mode-slider-prefs::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 2px;
    top: 2px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s;
}

.compact-mode-toggle-prefs input[type="checkbox"]:checked + .compact-mode-slider-prefs {
    background-color: var(--primary, #4A90E2);
}

.compact-mode-toggle-prefs input[type="checkbox"]:checked + .compact-mode-slider-prefs::before {
    transform: translateX(20px);
}

.compact-mode-label-prefs {
    font-size: 0.85em;
    font-weight: 500;
    color: var(--text);
}

/* Compact Mode - Sidebar Styles */
body.compact-mode-prefs .preferences-sidebar {
    width: 180px;
    padding: 10px;
}

body.compact-mode-prefs .preferences-sidebar .nav-item {
    padding: 8px 10px;
    gap: 8px;
    font-size: 0.9em;
}

body.compact-mode-prefs .preferences-sidebar .nav-item svg {
    width: 16px;
    height: 16px;
}

body.compact-mode-prefs .preferences-sidebar nav {
    gap: 3px;
}

body.compact-mode-prefs .preferences-sidebar div[style*="border-top"] {
    margin: 8px 0 !important;
}

/* Compact Mode - Content Area */
body.compact-mode-prefs .preferences-content {
    margin-left: 10px;
}

/* Compact Mode - Cards */
body.compact-mode-prefs .preferences-content > div[style*="padding"] {
    padding: 10px 12px !important;
}

body.compact-mode-prefs .preferences-content h3,
body.compact-mode-prefs .preferences-content h2 {
    margin-bottom: 8px !important;
    font-size: 1.1em !important;
}

body.compact-mode-prefs .preferences-content p {
    margin: 3px 0 !important;
    line-height: 1.4 !important;
}

/* Compact Mode - Forms */
body.compact-mode-prefs form {
    padding: 8px 12px !important;
}

body.compact-mode-prefs .form-control,
body.compact-mode-prefs .btn,
body.compact-mode-prefs input[type="text"],
body.compact-mode-prefs input[type="email"],
body.compact-mode-prefs input[type="password"],
body.compact-mode-prefs select,
body.compact-mode-prefs textarea {
    padding: 4px 8px !important;
    font-size: 0.9em !important;
}

body.compact-mode-prefs label {
    font-size: 0.9em;
    margin-bottom: 4px !important;
}

/* Compact Mode - Tables */
body.compact-mode-prefs table th,
body.compact-mode-prefs table td {
    padding: 6px 8px !important;
    font-size: 0.9em !important;
    line-height: 1.3 !important;
}

body.compact-mode-prefs table {
    margin-bottom: 10px !important;
}

/* Compact Mode - Folder/Project Cards */
body.compact-mode-prefs .folder-card,
body.compact-mode-prefs .project-card {
    padding: 10px !important;
}

body.compact-mode-prefs .folder-card h3,
body.compact-mode-prefs .project-card h3 {
    font-size: 1em !important;
    margin-bottom: 6px !important;
}

body.compact-mode-prefs .folder-card p,
body.compact-mode-prefs .project-card p {
    font-size: 0.85em !important;
}

/* Compact Mode - Buttons and Action Items */
body.compact-mode-prefs .btn {
    padding: 5px 10px !important;
    font-size: 0.9em !important;
}

body.compact-mode-prefs .btn-sm {
    padding: 3px 8px !important;
    font-size: 0.85em !important;
}

/* Compact Mode - Search Results/Activity Items */
body.compact-mode-prefs .activity-item,
body.compact-mode-prefs .search-item {
    padding: 8px 10px !important;
    margin-bottom: 6px !important;
}

body.compact-mode-prefs .activity-item p,
body.compact-mode-prefs .search-item p {
    font-size: 0.85em !important;
}

/* Compact Mode - Ticket List Items */
body.compact-mode-prefs .ticket-item {
    padding: 10px !important;
}

body.compact-mode-prefs .ticket-item h4 {
    font-size: 1em !important;
    margin-bottom: 4px !important;
}

/* Compact Mode - Subscription/Profile Cards */
body.compact-mode-prefs .card,
body.compact-mode-prefs .info-card {
    padding: 12px !important;
    margin-bottom: 10px !important;
}

body.compact-mode-prefs .card h4,
body.compact-mode-prefs .info-card h4 {
    font-size: 1em !important;
    margin-bottom: 6px !important;
}

/* Compact Mode - Spacing Utilities */
body.compact-mode-prefs .mb-3,
body.compact-mode-prefs .my-3 {
    margin-bottom: 8px !important;
}

body.compact-mode-prefs .mt-3,
body.compact-mode-prefs .my-3 {
    margin-top: 8px !important;
}

body.compact-mode-prefs .p-3 {
    padding: 10px !important;
}

/* Compact Mode - Responsive adjustments */
@media (max-width: 768px) {
    body.compact-mode-prefs .preferences-sidebar {
        width: 100%;
        margin-bottom: 8px;
    }
}
