/* VintageCashCow Brand Design System - Customer Portal */
:root {
    --primary-color: #36B44A;
    --primary-hover: #2d9a3d;
    --primary-light: #4dc45f;
    --primary-dark: #248032;
    --secondary-color: #ffe07d;
    --secondary-hover: #ffda5e;
    --secondary-dark: #e6c760;
    --success-color: #8b5cf6;
    --success-hover: #7c3aed;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --background: #f8fafc;
    --card-background: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    /* VintageCashCow Brand Colors */
}

/* Bootstrap Color Overrides */
.text-primary {
    color: var(--primary-color) !important;
}

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

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

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Base Overrides */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    background-color: var(--background);
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.6;
    display: flex;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
}

/* Sidebar Navigation - Override Bootstrap and other interference */
.sidebar,
div.sidebar,
.sidebar.bg-light,
.sidebar.bg-primary,
.sidebar.bg-secondary {
    width: 250px;
    height: 100vh;
    background: #d8d8d8 !important;
    background-color: #d8d8d8 !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
    filter: none !important;
    opacity: 1 !important;
    flex-shrink: 0;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.sidebar-brand {
    padding: 0.5rem 1.25rem 0.18rem 1.25rem;
    /*border-bottom: 1px solid rgba(255, 255, 255, 0.1);*/
    margin-top: 0.4rem;
    margin-bottom: 1em;
}

.sidebar-brand h4 {
    color: #ffffff;
    font-weight: 600;
    margin: 0;
    font-size: 1.25rem;
}

.sidebar-brand small {
    display: block;
    text-align: left;
    width: 100%;
}

.sidebar-logo-container {
    text-align: left;
    padding: 0.2rem 0;
}

.sidebar-logo {
    height: 60px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-item {
    margin-bottom: 0.25rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    color: #333;
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
    border-radius: 0;
}

.nav-link:hover {
    color: #000;
    background-color: rgba(0, 0, 0, 0.05);
}

.nav-link.active {
    color: #000;
    background-color: rgba(0, 0, 0, 0.1);
    border-right: 3px solid var(--secondary-color);
}

.nav-link i {
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--background);
    overflow-y: auto;
}

.top-bar {
    background-color: #d8d8d8;
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    color: #333;
}

.content-area {
    flex: 1;
    padding: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* Card System */
.auction-card {
    background: var(--card-background);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: none;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.auction-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-image {
    height: 250px;
    object-fit: cover;
    width: 100%;
    flex-shrink: 0;
}

.card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-content-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    margin-bottom: 1rem;
}

.card-content-wrapper .order-info {
    margin-top: auto; /* Push order info to bottom of wrapper */
}

.card-actions {
    margin-top: auto !important; /* Push to bottom */
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* Title truncation - max 2 lines */
.listing-title-truncate {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    max-height: calc(1.4em * 2); /* 2 lines */
}

.card-text {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Description scroll - fixed 2 lines with scroll for listings grid */
.listing-description-scroll {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    height: calc(1.6em * 2); /* Fixed 2 lines for all items */
    max-height: calc(1.6em * 2);
    min-height: calc(1.6em * 2);
    overflow-y: auto;
    line-height: 1.6;
    padding-right: 0.5rem; /* Space for scrollbar */
}

/* Description scroll for detail page - 11 lines */
.listing-detail-description-scroll {
    color: var(--text-secondary);
    height: calc(1.4em * 11); /* Fixed 11 lines for detail page */
    max-height: calc(1.4em * 11);
    min-height: calc(1.4em * 11);
    overflow-y: auto;
    line-height: 1.4; /* Reduced from 1.6 for tighter spacing */
    padding: 0.75rem;
    background: var(--background);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

/* Custom scrollbar styling for description */
.listing-description-scroll::-webkit-scrollbar,
.listing-detail-description-scroll::-webkit-scrollbar {
    width: 6px;
}

.listing-description-scroll::-webkit-scrollbar-track,
.listing-detail-description-scroll::-webkit-scrollbar-track {
    background: var(--background);
    border-radius: 3px;
}

.listing-description-scroll::-webkit-scrollbar-thumb,
.listing-detail-description-scroll::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.listing-description-scroll::-webkit-scrollbar-thumb:hover,
.listing-detail-description-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Button System */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.btn:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    color: white;
    box-shadow: var(--shadow-lg);
}

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

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

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

.btn-success:hover {
    background-color: var(--success-hover);
    color: white;
    box-shadow: var(--shadow-lg);
}

.bg-success {
    background-color: var(--success-color) !important;
}

.btn-large {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
}

.btn-outline-primary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

/* Form Controls */
.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background-color: var(--card-background);
}

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

.form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* Order Information */
.order-info {
    background: var(--background);
    padding: 1.25rem;
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.order-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.order-amount-small {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
}

.order-count {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Grid Layouts */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    border: none;
}

.alert-success {
    background-color: rgb(16, 185, 129, 0.1);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background-color: rgb(239, 68, 68, 0.1);
    color: var(--error-color);
    border-left: 4px solid var(--error-color);
}

.alert-info {
    background-color: rgb(37, 99, 235, 0.1);
    color: var(--primary-color);
    border-left: 4px solid var(--primary-color);
}

.alert-warning {
    background-color: rgb(245, 158, 11, 0.1);
    color: var(--warning-color);
    border-left: 4px solid var(--warning-color);
}

/* Tables */
.table {
    background-color: var(--card-background);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table th {
    background-color: var(--background);
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
    padding: 1rem;
}

.table td {
    padding: 0.875rem 1rem;
    vertical-align: middle;
}

/* Compact table for listing details */
.table-borderless {
    margin-bottom: 2rem; /* Add space after the table */
}

.table-borderless td {
    padding: 0.5rem 0.75rem; /* More balanced padding */
    line-height: 1.8;
    vertical-align: top;
}

.table-borderless td:first-child {
    width: 140px; /* Fixed width for labels */
    white-space: nowrap;
}

/* Status Badges */
.badge {
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.025em;
}

.badge-success {
    background-color: rgb(16, 185, 129, 0.2);
    color: var(--success-color);
}

.badge-warning {
    background-color: rgb(245, 158, 11, 0.2);
    color: var(--warning-color);
}

.badge-info {
    background-color: rgb(37, 99, 235, 0.2);
    color: var(--primary-color);
}

.badge-secondary {
    background-color: rgb(100, 116, 139, 0.1);
    color: var(--secondary-color);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #4dc45f 100%);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
    margin: 0 -2rem 2rem -2rem;
    border-radius: 8px;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* Hero CTA Button - Green with white text, darker shade for contrast on gradient */
.hero-section .btn-primary {
    background-color: var(--primary-dark);
    color: white;
    border: 2px solid var(--primary-dark);
    font-weight: 600;
}

.hero-section .btn-primary:hover {
    background-color: #1d6627;
    border-color: #1d6627;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Loading States */
.spinner-border {
    width: 2rem;
    height: 2rem;
    border-width: 0.25rem;
    border-color: var(--primary-color);
    border-right-color: transparent;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        order: 2;
    }
    
    .main-content {
        order: 1;
    }
    
    .items-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .content-area {
        padding: 1rem;
    }
    
    .hero-section {
        margin: 0 -1rem 1rem -1rem;
        padding: 2rem 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
}

/* Animations */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

/* Focus states for accessibility */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}


/* Page titles */
.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    margin-top: 0;
}

/* Content cards */
.content-card {
    background: var(--card-background);
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

/* Manage Account Navigation - Override for nav-pills */
.nav-pills .nav-link {
    color: var(--text-primary);
    background-color: transparent;
    border: none;
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
    margin-bottom: 0.25rem;
    transition: all 0.2s;
}

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

.nav-pills .nav-link.active {
    color: #ffffff;
    background-color: var(--primary-color);
    border: none;
    font-weight: 600;
}

/* Stat Cards */
.stat-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 200px;
}

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

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Order Tabs Navigation */
.nav-tabs .nav-link {
    color: var(--text-secondary);
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: 0.5rem 0.5rem 0 0;
    padding: 0.75rem 1rem;
    transition: all 0.2s;
    font-weight: 500;
}

.nav-tabs .nav-link:hover {
    color: var(--primary-color);
    background-color: var(--background);
    border-color: var(--border-color) var(--border-color) transparent;
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    background-color: var(--card-background);
    border-color: var(--border-color) var(--border-color) var(--card-background);
    font-weight: 600;
}

.nav-tabs .nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Buy It Now Price Box */
.buy-it-now-box {
    border: 2px solid var(--primary-color);
    border-radius: 0.5rem;
    padding: 1rem;
    background-color: #e8f5e9;
}

.buy-it-now-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.buy-it-now-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.buy-it-now-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Auction Only Box */
.auction-only-box {
    border: 2px solid #06b6d4;
    border-radius: 0.5rem;
    padding: 1rem;
    background-color: rgba(6, 182, 212, 0.05);
    text-align: center;
}

.auction-only-text {
    font-size: 0.875rem;
    color: #0891b2;
    font-weight: 500;
}

/* Green Button (View Details) */
.btn.btn-green {
    background-color: #48bb78 !important;
    color: white !important;
    border: none !important;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.btn.btn-green:hover {
    background-color: #2d9a3d !important;
    color: white !important;
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
}

.btn.btn-green:disabled {
    background-color: #86d693 !important;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Purple Button (Order Now) */
.btn.btn-purple {
    background-color: #805ad5 !important;
    color: white !important;
    border: none !important;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.btn.btn-purple:hover {
    background-color: #7c3aed !important;
    color: white !important;
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
}

.btn.btn-purple:disabled {
    background-color: #c4b5fd !important;
    cursor: not-allowed;
}

/* Buy Now Button  */
.btn.btn-mustard {
    background-color: var(--warning-color) !important;
    color: white !important;
    border: none !important;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.btn.btn-mustard:hover {
    background-color: #d97706 !important;
    color: white !important;
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
}

    .btn.btn-mustard:disabled {
        background-color: var(--warning-color) !important;
        cursor: not-allowed;
        opacity: 0.6;
    }

/* Buy It Now Info Box - Light Blue */
.buy-it-now-info-box {
    border-left: 4px solid #06b6d4;
    border-top: none;
    border-right: none;
    border-bottom: none;
    border-radius: 0;
    padding: 1rem;
    background-color: #06b6d40d;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Auction Info Box - Light Yellow */
.auction-info-box {
    border-left: 4px solid var(--warning-color);
    border-top: none;
    border-right: none;
    border-bottom: none;
    border-radius: 0;
    padding: 1rem;
    background-color: #fef5e7;
    font-size: 0.875rem;
    line-height: 1.5;
}