/* Project Bob Auction System Styles */

/* Override any conflicting styles from commanding.css */
body.auction-page .main-container {
    display: none !important;
}

/* CSS Variables */
:root {
    --bg-primary: #0a192f;
    --bg-secondary: #112240;
    --text-primary: #ccd6f6;
    --text-secondary: #8892b0;
    --accent: #64ffda;
    --border-color: #233554;
    --success: #28a745;
    --error: #dc3545;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Auction Header */
.auction-header {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    margin: 1rem;
    box-shadow: var(--card-shadow);
}

.auction-header h2 {
    color: var(--accent);
    font-size: 2rem;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 700;
    text-shadow: 0 0 20px rgba(100, 255, 218, 0.5);
}

.auction-header h3 {
    color: var(--text-primary);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 400;
    opacity: 0.9;
}

.auction-blurb {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 1rem;
    max-width: 1000px;
    margin: 0 auto;
}

.auction-blurb strong {
    color: var(--accent);
    font-weight: 600;
}

.auction-rules {
    background: var(--bg-primary);
    border: 1px solid var(--accent);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.auction-rules ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.auction-rules li {
    color: var(--text-primary);
    padding: 0.5rem 0;
    padding-left: 2rem;
    position: relative;
}

.auction-rules li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

/* Main Container */
.auction-container {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    min-height: calc(100vh - 200px);
}

/* Map Container - Auction specific */
.auction-container .map-container {
    flex: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    position: relative;
    min-height: 400px;
    width: auto;
}

#auctionMapView {
    width: 100%;
    height: 100%;
}

/* Latitude List Container */
.latitude-list-container {
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 1rem;
}

.list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.list-header h3 {
    color: var(--accent);
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
}

.list-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.sort-btn {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

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

.sort-btn.active {
    background: var(--bg-primary);
    color: var(--accent);
    border-color: var(--accent);
}

.latitude-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.latitude-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.latitude-item:hover {
    border-color: var(--accent);
    transform: translateX(4px);
    box-shadow: 0 0 10px rgba(100, 255, 218, 0.2);
}

.latitude-item.user-bid {
    border-color: rgba(100, 255, 218, 0.5);
    background: rgba(100, 255, 218, 0.05);
}

.latitude-info {
    flex: 1;
}

.latitude-name {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.latitude-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.current-price {
    color: var(--accent);
    font-weight: 600;
}

.bid-count {
    color: var(--text-secondary);
}

.bid-btn {
    background: var(--accent);
    color: var(--bg-primary);
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.9rem;
}

.bid-btn:hover {
    background: #5bd4a8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(100, 255, 218, 0.4);
}

.bid-btn:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Bid Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.bid-modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .bid-modal {
    transform: scale(1);
}

.modal-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    color: var(--accent);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.modal-latitude {
    color: var(--text-primary);
    font-size: 1.2rem;
}

.modal-info {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.modal-info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.modal-info-row:last-child {
    margin-bottom: 0;
}

.modal-info-label {
    font-weight: 500;
}

.modal-info-value {
    color: var(--text-primary);
    font-weight: 600;
}

.modal-info-value.price {
    color: var(--accent);
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-input {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(100, 255, 218, 0.2);
}

.form-hint {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.modal-btn {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.modal-btn.cancel {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.modal-btn.cancel:hover {
    background: var(--bg-secondary);
    border-color: var(--text-secondary);
}

.modal-btn.confirm {
    background: var(--accent);
    color: var(--bg-primary);
}

.modal-btn.confirm:hover {
    background: #5bd4a8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(100, 255, 218, 0.4);
}

.modal-btn:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
    transform: none;
}

/* Map Legend */
.map-legend {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(10, 25, 47, 0.95);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.legend-title {
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.legend-color {
    width: 20px;
    height: 12px;
    border-radius: 2px;
    border: 1px solid var(--border-color);
}

/* Success/Error Messages */
.message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    z-index: 2000;
    animation: slideDown 0.3s ease;
}

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

.message.error {
    background: var(--error);
    color: white;
}

@keyframes slideDown {
    from {
        transform: translate(-50%, -100%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* Mobile Toggle Button */
.mobile-toggle-container {
    display: none; /* Hidden by default, shown only on mobile */
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.mobile-toggle-btn {
    width: 100%;
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
}

.mobile-toggle-btn:hover,
.mobile-toggle-btn.active {
    background: var(--accent);
    color: var(--bg-primary);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(100, 255, 218, 0.3);
}

.toggle-icon {
    font-size: 1.2rem;
}

/* Responsive Design - Mobile First */
/* Mobile styles (default) */
.auction-container {
    flex-direction: column;
    height: calc(100vh - 180px); /* Account for header and toggle button */
}

.auction-container .map-container {
    width: 100%;
    height: calc(100vh - 180px); /* Full viewport height minus header and toggle */
    min-height: 300px;
    order: 1;
}

.latitude-list-container {
    width: 100%;
    height: auto;
    max-height: 70vh;
    order: 2;
    display: none; /* Hide on mobile by default */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-top: 2px solid var(--accent);
    border-radius: 16px 16px 0 0;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.latitude-list-container.mobile-visible {
    display: flex;
    transform: translateY(0);
}

/* Tablet and up */
@media (min-width: 768px) {
    /* Hide mobile toggle on desktop */
    .mobile-toggle-container {
        display: none !important;
    }
    
    .auction-container {
        flex-direction: row;
        height: calc(100vh - 120px);
    }
    
    .auction-container .map-container {
        flex: 1;
        width: auto;
        height: calc(100vh - 120px);
        min-height: 500px;
    }
    
    .latitude-list-container {
        width: 350px;
        height: calc(100vh - 120px);
        display: flex !important; /* Show on desktop */
        position: static;
        transform: none;
        border-radius: 8px;
        border-top: none;
        border: 1px solid var(--border-color);
        box-shadow: var(--card-shadow);
        max-height: none;
    }
    
    /* Reset mobile styles for desktop */
    .latitude-item {
        flex-direction: row;
        align-items: center;
        padding: 1rem;
        gap: 0;
    }
    
    .latitude-stats {
        flex-direction: row;
        gap: 1rem;
    }
    
    .bid-btn {
        padding: 0.5rem 1.5rem;
        font-size: 0.9rem;
        min-height: auto;
    }
}

/* Mobile-specific adjustments */
@media (max-width: 767px) {
    /* Show mobile toggle button */
    .mobile-toggle-container {
        display: block;
    }
    
    .auction-header {
        padding: 1rem;
        margin: 0.5rem;
    }
    
    .auction-header h2 {
        font-size: 1.5rem;
    }
    
    .auction-header h3 {
        font-size: 1.1rem;
    }
    
    .auction-blurb {
        font-size: 0.9rem;
    }
    
    .auction-container {
        padding: 0.5rem;
        gap: 0.5rem;
    }
    
    .bid-modal {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    /* Improved mobile latitude items */
    .latitude-item {
        padding: 1rem;
        margin-bottom: 0.75rem;
        border-radius: 12px;
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        min-height: 80px;
        background: var(--bg-primary);
        border: 2px solid var(--border-color);
    }
    
    .latitude-item:hover {
        transform: none; /* Remove slide effect on mobile */
        box-shadow: 0 0 15px rgba(100, 255, 218, 0.3);
    }
    
    .latitude-info {
        text-align: left;
    }
    
    .latitude-name {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
        color: var(--accent);
    }
    
    .latitude-stats {
        flex-direction: row;
        justify-content: space-between;
        gap: 1rem;
        font-size: 0.9rem;
    }
    
    .current-price {
        font-size: 1.1rem;
        font-weight: bold;
    }
    
    .bid-btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
        border-radius: 8px;
        min-height: 48px; /* Better touch target */
        font-weight: bold;
    }
    
    .bid-btn:hover {
        transform: none; /* Remove hover effects on mobile */
    }
    
    .map-legend {
        top: 10px;
        right: 10px;
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    /* Mobile list container improvements */
    .latitude-list-container .list-header {
        padding: 1rem;
        border-bottom: 2px solid var(--border-color);
        background: var(--bg-secondary);
        position: sticky;
        top: 0;
        z-index: 10;
    }
    
    .latitude-list-container .list-header h3 {
        font-size: 1.3rem;
        margin-bottom: 0.75rem;
    }
    
    .latitude-list {
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .list-controls {
        gap: 0.75rem;
    }
    
    .sort-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        border-radius: 6px;
        min-height: 40px; /* Better touch target */
        flex: 1;
        text-align: center;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .auction-header {
        padding: 0.75rem;
    }
    
    .auction-header h2 {
        font-size: 1.3rem;
    }
    
    .auction-header h3 {
        font-size: 1rem;
    }
    
    .auction-blurb {
        font-size: 0.85rem;
    }
    
    .auction-container {
        padding: 0.25rem;
    }
    
    .auction-container .map-container {
        height: calc(100vh - 160px); /* Account for toggle button */
        min-height: 250px;
    }
    
    /* Extra small screen latitude items */
    .latitude-item {
        padding: 0.875rem;
        gap: 0.5rem;
    }
    
    .latitude-name {
        font-size: 1.1rem;
    }
    
    .latitude-stats {
        flex-direction: column;
        gap: 0.25rem;
        text-align: left;
    }
    
    .current-price {
        font-size: 1rem;
    }
    
    .bid-btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
        min-height: 44px;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .list-controls {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .sort-btn {
        flex: 1;
        min-width: 80px;
        font-size: 0.8rem;
    }
    
    .mobile-toggle-btn {
        padding: 0.875rem;
        font-size: 0.9rem;
    }
    
    .latitude-list-container {
        max-height: 75vh;
    }
}

/* Custom cross-hatch patterns for map elements */
.crosshatch-green {
    background-image: 
        linear-gradient(45deg, rgba(0, 255, 0, 0.1) 25%, transparent 25%), 
        linear-gradient(-45deg, rgba(0, 255, 0, 0.1) 25%, transparent 25%);
    background-size: 8px 8px;
    background-position: 0 0, 0 4px;
}

.crosshatch-yellow {
    background-image: 
        linear-gradient(45deg, rgba(255, 255, 0, 0.15) 25%, transparent 25%), 
        linear-gradient(-45deg, rgba(255, 255, 0, 0.15) 25%, transparent 25%);
    background-size: 8px 8px;
    background-position: 0 0, 0 4px;
}

.crosshatch-orange {
    background-image: 
        linear-gradient(45deg, rgba(255, 136, 0, 0.2) 25%, transparent 25%), 
        linear-gradient(-45deg, rgba(255, 136, 0, 0.2) 25%, transparent 25%);
    background-size: 8px 8px;
    background-position: 0 0, 0 4px;
}

.crosshatch-red {
    background-image: 
        linear-gradient(45deg, rgba(255, 0, 0, 0.25) 25%, transparent 25%), 
        linear-gradient(-45deg, rgba(255, 0, 0, 0.25) 25%, transparent 25%);
    background-size: 8px 8px;
    background-position: 0 0, 0 4px;
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .latitude-item:hover {
        transform: none;
        box-shadow: none;
        border-color: var(--border-color);
    }
    
    .bid-btn:hover {
        transform: none;
        background: var(--accent);
        box-shadow: none;
    }
    
    .sort-btn:hover {
        background: var(--bg-secondary);
        color: var(--text-secondary);
        border-color: var(--border-color);
    }
    
    .sort-btn.active:hover {
        background: var(--bg-primary);
        color: var(--accent);
        border-color: var(--accent);
    }
    
    /* Add touch feedback instead */
    .latitude-item:active {
        background: rgba(100, 255, 218, 0.1);
        border-color: var(--accent);
    }
    
    .bid-btn:active {
        background: #5bd4a8;
        transform: scale(0.98);
    }
    
    .sort-btn:active {
        background: var(--bg-primary);
        color: var(--accent);
        border-color: var(--accent);
    }
} 