@import url('https://fonts.googleapis.com/css2?family=Poppins:wght=500&family=Roboto:wght=300&display=swap');

* {
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    position: absolute;
    margin: 0px;
    padding: 0px;
    width: 100vw;
    background-color: #fff; /* or whatever default background you have behind it */
}

/* Modify Container to leave room for the Sidebar */
#container {
    display: flex;
    align-content: center;
    flex-wrap: wrap;
    align-items: center;
    flex-direction: column;
    margin: 0;
    padding: 0;
    padding-right: 320px; /* SHIFTS DASHBOARD LEFT TO MAKE ROOM FOR SIDEBAR */
    padding-top: 20px;
    width: 100vw;
}

/* Shorter Dashboard Header */
.address {
    padding: 20px 30px; 
    color: white;
    background-color: rgb(45, 45, 45); 
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80px;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 28px;
    font-weight: bold;
    max-width: calc(100% - 400px); 
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-lot { color: #f0c14b; }
.header-divider { color: #666; }
.header-address { color: #ffffff; }

/* Vertically center the header buttons */
.settings-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 20px;
    font-size: 16px;
    padding: 10px 15px;
    width: auto;
    margin: 0;
    background-color: #333;
    color: white;
    border: 1px solid white;
    cursor: pointer;
    border-radius: 4px;
}
.settings-btn:hover { background-color: #555; }

.holding-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 150px; /* Adjusted spacing */
    font-size: 16px;
    padding: 10px 20px;
    width: auto;
    margin: 0;
    background-color: #333; 
    color: white;
    border: 1px solid white;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s, border-color 0.3s;
}
.holding-btn:hover { background-color: #555; }
.holding-btn.active { 
    background-color: #ff4c4c !important; 
    border-color: #ff4c4c !important;
}

/* --- NEW: QUICK SWITCH SIDEBAR --- */
#quick-switch-sidebar {
    position: fixed;
    top: 80px; /* Sits exactly under the new 80px header */
    right: 0;
    width: 320px;
    height: calc(100vh - 80px);
    background: #2b2b2b;
    border-left: 2px solid #444;
    overflow-y: auto;
    padding: 20px;
    color: white;
    z-index: 50;
    box-shadow: -5px 0 15px rgba(0,0,0,0.2);
}

#quick-switch-sidebar h3 {
    margin-top: 0;
    color: #f0c14b;
    font-size: 18px;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.qs-lot-item {
    background: #3a3a3a;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 10px;
    cursor: pointer;
    border-left: 4px solid #666;
    transition: background 0.2s, border-color 0.2s;
}

.qs-lot-item:hover {
    background: #4a4a4a;
}

.qs-lot-item.active {
    border-left: 4px solid #4caf50;
    background: #2a3b2a;
}

.qs-lot-info {
    font-size: 16px;
    font-weight: bold;
}

.qs-lot-address {
    font-size: 13px;
    color: #ccc;
    margin-top: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* --------------------------------- */

/* Bidding Dashboard Buttons Grid */
.button-container {
    margin-right: auto;
    margin-left: auto;
    width: 960px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* NEW: Centers the buttons inside the grid */
}

button {
    width: 200px;
    padding: 16px;
    margin-right: 16px;
    margin-top: 16px;
    font-size: 40px;
    text-align: center;
    display: block;
    border: solid 1px;
    border-radius: 0px;
    transition: background-color .4s;
}

.clear-width { width: auto; }
.button-small { width: 145.6px; }
.bidButton { width: 173px; }
.bid-button { width: 177px; }

button:hover { cursor: pointer; background-color: lightgray; }
button:active { cursor: pointer; background-color: grey; }

.side-button { margin-left: 50px; }
.button-active { background-color: #f3e58c !important; }

.new-bid-free {
    font-size: 60px;
    resize: none;
    text-align: center;
}

/* OVERLAY & SETUP FORM */
#cover {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(30, 30, 30, 0.98);
    font-size: 20px;
    color: white;
    z-index: 100;
    overflow-y: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 40px;
}

#form-container {
    font-family: 'Roboto', sans-serif;
    background: #444;
    padding: 40px;
    border-radius: 8px;
    width: 90%;
    max-width: 1200px;
    box-shadow: 0px 10px 30px rgba(0,0,0,0.5);
    margin-bottom: 40px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    align-items: flex-end;
}

.form-group {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.form-group label {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    margin-bottom: 5px;
}

input, select {
    font-size: 24px;
    font-family: 'Roboto', sans-serif;
    padding: 10px;
    width: 100%;
}

/* Custom Dropdown Loader Spinner */
.dropdown-wrapper {
    position: relative;
    width: 100%;
}

.spinner {
    position: absolute;
    right: 35px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    border-top-color: #f0c14b;
    animation: spin 0.8s linear infinite;
    pointer-events: none;
}

@keyframes spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

/* Queue List Styles */
.queue-container {
    margin-top: 40px;
    border-top: 2px solid #666;
    padding-top: 20px;
}

/* Subtle Clear Queue Button */
#clear-queue-btn {
    background-color: transparent;
    border: 1px solid #777;
    color: #ccc;
    font-size: 13px;
    padding: 8px 15px;
    margin: 0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

#clear-queue-btn:hover {
    background-color: #ff4c4c !important;
    border-color: #ff4c4c !important;
    color: white !important;
}

.lot-item {
    background: #333;
    padding: 15px 25px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 5px solid #666;
    cursor: grab;
    /* NEW: Add smooth transitions for picking up and dropping */
    transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1), background-color 0.2s, box-shadow 0.2s;
}

.lot-item.active-lot {
    border-left: 5px solid #4caf50;
    background: #2a3b2a;
}

.lot-info {
    font-size: 24px;
}

/* NEW: Stop inner elements from triggering drag flicker */
.lot-item * {
    pointer-events: none;
}

/* NEW: Re-enable clicking on the action buttons */
.lot-actions button {
    pointer-events: auto; 
    margin: 0 0 0 10px;
    width: auto;
    font-size: 18px;
    padding: 10px 20px;
    display: inline-block;
}

.lot-item:active { 
    cursor: grabbing; 
}

/* NEW: Give a 3D "lifted" effect when dragging instead of just fading */
.lot-item.dragging { 
    opacity: 0.9; 
    background-color: #444; 
    transform: scale(0.98);
    box-shadow: 0 15px 25px rgba(0,0,0,0.5);
    border-left-color: #f0c14b;
    z-index: 10;
}

/* NEW: Use inset box-shadow instead of border to prevent the UI from jumping */
.lot-item.drag-over { 
    box-shadow: inset 0 4px 0 0 #f0c14b;
    background-color: #3a3a3a;
}

.drag-handle {
    font-size: 24px;
    color: #888;
    margin-right: 15px;
}

/* Custom Professional Modal */
#custom-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: flex; justify-content: center; align-items: center;
}

.custom-modal {
    background: #444; color: white; padding: 35px; border-radius: 8px;
    max-width: 550px; width: 90%; text-align: center;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
    font-family: 'Roboto', sans-serif;
    animation: pop-in 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.custom-modal h2 { margin-top: 0; color: #f0c14b; font-size: 32px; }
.custom-modal p { font-size: 22px; line-height: 1.4; margin-bottom: 35px; color: #ddd; }
.modal-buttons { display: flex; justify-content: center; gap: 20px; }

.modal-btn { 
    width: auto; min-width: 140px; font-size: 22px; 
    padding: 12px 25px; margin: 0; border: none; border-radius: 4px; 
}
.confirm-btn { background: #4caf50; color: white; }
.confirm-btn:hover { background: #45a049; }
.cancel-btn { background: #ff4c4c; color: white; }
.cancel-btn:hover { background: #e43c3c; }

@keyframes pop-in {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.hide { display: none !important; }
.big-text { font-size: 64px; }