/* Auction Enhancements CSS */
/* Enhanced styling for auction functionality */

/* Auction Item Containers */
.auction-item {
    position: relative;
    transition: all 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
}

.auction-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Auction Status Indicators */
.auction-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auction-indicator.live {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    animation: pulse 2s infinite;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.4);
}

.auction-indicator.ending-soon {
    background: linear-gradient(45deg, #ffc107, #fd7e14);
    color: #212529;
    animation: blink 1s infinite;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.4);
}

.auction-indicator.ended {
    background: linear-gradient(45deg, #6c757d, #495057);
    color: white;
}

/* Countdown Styling */
.countdown {
    font-weight: 600;
    font-family: 'Courier New', monospace;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    display: inline-block;
    min-width: 120px;
    text-align: center;
}

.countdown-urgent {
    color: #dc3545 !important;
    background: rgba(220, 53, 69, 0.1) !important;
    font-weight: bold;
    animation: pulse 1s infinite;
    border: 2px solid rgba(220, 53, 69, 0.3);
}

.countdown-ended {
    color: #6c757d;
    background: rgba(108, 117, 125, 0.1);
    text-decoration: line-through;
}

/* Bid Section */
.bid-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
    border: 1px solid #e9ecef;
}

.bid-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bid-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.bid-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.bid-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.bid-input.is-valid {
    border-color: #28a745;
    background-color: rgba(40, 167, 69, 0.05);
}

.bid-input.is-invalid {
    border-color: #dc3545;
    background-color: rgba(220, 53, 69, 0.05);
}

.bid-btn {
    padding: 12px 24px;
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bid-btn:hover {
    background: linear-gradient(45deg, #0056b3, #004085);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.bid-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Quick Bid Buttons */
.quick-bid-container {
    margin: 10px 0;
}

.quick-bid-label {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 8px;
    display: block;
}

.quick-bid-btn {
    margin: 2px;
    padding: 6px 12px;
    font-size: 12px;
    background: #e9ecef;
    color: #495057;
    border: 1px solid #ced4da;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-bid-btn:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

/* Current Bid Display */
.current-bid {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    text-align: center;
    margin: 15px 0;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2);
}

.current-bid-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 5px;
}

.current-bid-amount {
    font-size: 24px;
    font-weight: bold;
    margin: 0;
}

.bid-count {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 5px;
}

/* Auction Status Classes */
.auction-status-live {
    border-left: 4px solid #28a745;
}

.auction-status-ending-soon {
    border-left: 4px solid #ffc107;
}

.auction-status-ended {
    opacity: 0.7;
    filter: grayscale(50%);
    border-left: 4px solid #6c757d;
}

.auction-ended {
    position: relative;
}

.auction-ended::after {
    content: "ENDED";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    background: rgba(220, 53, 69, 0.9);
    color: white;
    padding: 10px 20px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 8px;
    z-index: 20;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Notification System */
.auction-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
    min-width: 300px;
    max-width: 400px;
    animation: slideInRight 0.3s ease;
}

.bid-error, .bid-success {
    font-size: 14px;
    border-radius: 6px;
    padding: 12px 15px;
    margin-top: 10px;
}

.bid-error {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #721c24;
}

.bid-success {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.3);
    color: #155724;
}

/* Bidder Information */
.bidder-info {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin: 10px 0;
}

.highest-bidder {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #495057;
}

.bidder-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #007bff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 12px;
}

/* Auction Grid Layout */
.auction-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .auction-indicator {
        top: 5px;
        right: 5px;
        padding: 3px 6px;
        font-size: 10px;
    }
    
    .bid-input-group {
        flex-direction: column;
    }
    
    .bid-input {
        width: 100%;
    }
    
    .current-bid-amount {
        font-size: 20px;
    }
    
    .auction-notification {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
    
    .auction-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (max-width: 576px) {
    .bid-section {
        padding: 15px;
        margin: 10px 0;
    }
    
    .quick-bid-btn {
        padding: 4px 8px;
        font-size: 11px;
        margin: 1px;
    }
    
    .countdown {
        min-width: 100px;
        padding: 6px 8px;
        font-size: 12px;
    }
}

/* Animations */
@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.6; }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Loading States */
.auction-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Auction History */
.auction-history {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin: 20px 0;
    overflow: hidden;
}

.auction-history-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
    color: #495057;
}

.bid-history-item {
    padding: 12px 20px;
    border-bottom: 1px solid #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bid-history-item:last-child {
    border-bottom: none;
}

.bid-history-item.winning-bid {
    background: rgba(40, 167, 69, 0.05);
    border-left: 3px solid #28a745;
}

/* Auction Timer Widget */
.auction-timer-widget {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    margin: 20px 0;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.timer-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 10px;
}

.timer-display {
    font-size: 28px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .bid-section {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .bid-input {
        background: #1a202c;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .auction-history {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .auction-history-header {
        background: #1a202c;
        color: #e2e8f0;
    }
}

/* Print Styles */
@media print {
    .auction-indicator,
    .bid-section,
    .quick-bid-container,
    .auction-notification {
        display: none !important;
    }
    
    .auction-item {
        break-inside: avoid;
        margin-bottom: 20px;
    }
}