/**
 * WC Auction Frontend Styles
 */

.wc-auction-info {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    background: #f9f9f9;
}

/* Status Badge */
.auction-status-badge {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 3px;
    font-weight: bold;
    margin-bottom: 15px;
    text-transform: uppercase;
    font-size: 12px;
}

.auction-status-badge.status-active {
    background: #28a745;
    color: white;
}

.auction-status-badge.status-ending_soon {
    background: #ff6b6b;
    color: white;
    animation: pulse 1s infinite;
}

.auction-status-badge.status-ended,
.auction-status-badge.status-completed {
    background: #6c757d;
    color: white;
}

.auction-status-badge.status-scheduled {
    background: #17a2b8;
    color: white;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Bid Display */
.auction-current-bid,
.auction-min-next-bid {
    margin: 10px 0;
    font-size: 18px;
}

.auction-current-bid .amount {
    font-size: 28px;
    font-weight: bold;
    color: #333;
}

.auction-min-next-bid .amount {
    font-size: 20px;
    font-weight: 600;
    color: #666;
}

/* Timer */
.auction-timer {
    margin: 15px 0;
    padding: 15px;
    background: white;
    border-radius: 3px;
    text-align: center;
}

.auction-timer .countdown {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-top: 5px;
}

.auction-timer .countdown.urgent {
    color: #ff6b6b;
    animation: pulse 1s infinite;
}

.auction-timer.auction-ended {
    background: #f8f9fa;
}

.auction-timer.auction-ended .label {
    color: #6c757d;
    font-weight: bold;
}

/* Buy Now */
.auction-buy-now {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px dashed #ddd;
}

.buy-now-divider {
    text-align: center;
    position: relative;
    margin: 20px 0;
}

.buy-now-divider span {
    background: white;
    padding: 0 15px;
    color: #999;
    font-weight: bold;
    position: relative;
    z-index: 1;
}

.buy-now-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #ddd;
    z-index: 0;
}

.buy-now-btn {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    font-weight: bold;
    background: #ffc107;
    border-color: #ffc107;
    color: #000;
    transition: all 0.3s ease;
}

.buy-now-btn:hover {
    background: #e0a800;
    border-color: #d39e00;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 193, 7, 0.4);
}

/* Stats */
.auction-stats {
    display: flex;
    gap: 20px;
    margin: 15px 0;
    padding: 15px;
    background: white;
    border-radius: 3px;
}

.auction-stats .stat {
    flex: 1;
}

.auction-stats .label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.auction-stats .value {
    display: block;
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.auction-stats .reserve-met {
    color: #28a745;
}

.auction-stats .reserve-not-met {
    color: #ffc107;
}

/* Participation */
.auction-participation {
    margin: 20px 0;
    padding: 15px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 3px;
}

.auction-participation .participation-notice {
    margin: 0 0 10px 0;
    font-weight: bold;
}

/* Bid Form */
.auction-bid-form {
    margin: 20px 0;
    padding: 20px;
    background: white;
    border-radius: 3px;
}

.proxy-status-notice {
    padding: 12px;
    background: #d4edda;
    border: 1px solid #28a745;
    border-radius: 3px;
    color: #155724;
    margin-bottom: 15px;
    font-weight: 600;
    animation: fadeIn 0.3s ease;
}

.winning-notice {
    padding: 10px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 3px;
    color: #155724;
    margin-bottom: 15px;
    font-weight: bold;
    animation: fadeIn 0.3s ease;
}

.won-notice {
    padding: 15px;
    background: #d4edda;
    border: 2px solid #28a745;
    border-radius: 5px;
    color: #155724;
    margin-bottom: 15px;
    font-weight: bold;
    font-size: 18px;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.winner-order-actions {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    text-align: center;
}

.winner-pay-btn,
.winner-order-btn {
    display: inline-block;
    padding: 15px 30px !important;
    font-size: 18px !important;
    font-weight: bold !important;
    margin: 10px 0 !important;
    min-width: 250px;
    transition: all 0.3s ease;
    text-decoration: none !important;
}

.winner-pay-btn {
    background: #28a745 !important;
    color: white !important;
    border: none !important;
}

.winner-pay-btn:hover {
    background: #218838 !important;
    transform: scale(1.05);
    color: white !important;
}

.winner-order-btn {
    background: #007bff !important;
    color: white !important;
    border: none !important;
}

.winner-order-btn:hover {
    background: #0056b3 !important;
    transform: scale(1.05);
    color: white !important;
}

.order-status-text {
    margin: 10px 0 0 0;
    font-size: 14px;
    color: #666;
}

.auction-ended-notice {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 5px;
}

.auction-ended-no-winner {
    text-align: center;
    padding: 30px;
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    margin: 20px 0;
}

.auction-ended-no-winner h3 {
    color: #856404;
    margin-bottom: 15px;
    font-size: 24px;
}

.auction-ended-no-winner p {
    color: #856404;
    margin: 10px 0;
    font-size: 16px;
}

.auction-ended-no-winner p strong {
    font-size: 18px;
    color: #664d03;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.bid-input-group {
    margin-bottom: 15px;
}

.bid-input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.bid-input-group input[type="number"] {
    width: 100%;
    padding: 10px;
    font-size: 18px;
    border: 2px solid #ddd;
    border-radius: 3px;
}

.bid-validation {
    display: block;
    margin-top: 5px;
    font-size: 14px;
}

.bid-validation.valid {
    color: #28a745;
}

.bid-validation.invalid {
    color: #dc3545;
}

.bid-help-text {
    font-size: 14px;
    color: #666;
    margin-top: 10px;
}

/* Proxy Bidding */
.proxy-bid-option {
    margin: 15px 0;
    padding: 12px;
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 3px;
}

.proxy-bid-option label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    color: #0066cc;
    margin: 0;
}

.proxy-bid-option input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
}

.proxy-help-text {
    margin: 8px 0 0 0;
    font-size: 13px;
    color: #555;
}

.proxy-max-bid-field {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #b3d9ff;
}

.proxy-max-bid-field label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.proxy-max-bid-field input[type="number"] {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 2px solid #0066cc;
    border-radius: 3px;
}

.proxy-max-help {
    margin: 8px 0 0 0;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

#place-bid-btn {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
}

/* Dynamic Button States */
#place-bid-btn.btn-winning {
    background: #28a745;
    border-color: #28a745;
    color: white;
    box-shadow: 0 4px 6px rgba(40, 167, 69, 0.3);
}

#place-bid-btn.btn-winning:hover {
    background: #218838;
    border-color: #1e7e34;
    transform: translateY(-1px);
    box-shadow: 0 6px 8px rgba(40, 167, 69, 0.4);
}

#place-bid-btn.btn-outbid {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

#place-bid-btn.btn-outbid:hover {
    background: #c82333;
    border-color: #bd2130;
}

/* Login Required */
.auction-login-required,
.auction-participation-required,
.auction-scheduled-notice,
.auction-ended-notice {
    padding: 15px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 3px;
    margin: 20px 0;
    text-align: center;
}

/* Bid History */
.auction-bid-history {
    margin-top: 30px;
}

.auction-bid-history h3 {
    margin-bottom: 15px;
}

.bid-history-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.bid-history-table th,
.bid-history-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.bid-history-table th {
    background: #f5f5f5;
    font-weight: bold;
}

.bid-history-table .winning-bid {
    background: #d4edda;
    animation: highlightBid 0.5s ease;
}

.bid-history-table .current-user-bid {
    background: #e7f3ff;
}

@keyframes highlightBid {
    0% { background: #fff; }
    50% { background: #a8d5a8; }
    100% { background: #d4edda; }
}

.bid-history-table .status-winning {
    color: #28a745;
    font-weight: bold;
}

.bid-history-table .status-won {
    color: #ffc107;
    font-weight: bold;
}

.bid-history-table .status-outbid {
    color: #6c757d;
}

.bid-history-table .status-lost {
    color: #999;
}

/* Toast Notifications */
.wc-auction-toast-notification {
    position: fixed;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 15px 25px;
    border-radius: 5px;
    font-weight: 500;
    font-size: 15px;
    z-index: 99999;
    min-width: 300px;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    opacity: 0;
    transition: all 0.3s ease;
}

.wc-auction-toast-notification.position-top {
    top: 20px;
}

.wc-auction-toast-notification.position-bottom {
    bottom: 20px;
    transform: translateX(-50%) translateY(-20px);
}

.wc-auction-toast-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.wc-auction-toast-notification.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.wc-auction-toast-notification.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.wc-auction-toast-notification.warning {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
}

.wc-auction-toast-notification.info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .auction-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .auction-current-bid .amount {
        font-size: 24px;
    }
    
    .auction-min-next-bid .amount {
        font-size: 18px;
    }
    
    .wc-auction-toast-notification {
        min-width: 280px;
        max-width: 90%;
        font-size: 14px;
        padding: 12px 20px;
    }
}
