/**
 * Antique Auctions - Frontend Styles
 *
 * @package Antique_Auctions
 */

/* ==========================================================================
   Auction Details Container
   ========================================================================== */

.auction-details-container {
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
}

/* Status Badge */
.auction-status-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.auction-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auction-status-badge.status-active {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    animation: pulse 2s infinite;
}

.auction-status-badge.status-pending {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
}

.auction-status-badge.status-ended,
.auction-status-badge.status-sold {
    background: #6b7280;
    color: #fff;
}

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

/* Reserve Status */
.reserve-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 4px;
}

.reserve-status.reserve-met {
    background: #d1fae5;
    color: #065f46;
}

.reserve-status.reserve-not-met {
    background: #fef3c7;
    color: #92400e;
}

.reserve-status .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* ==========================================================================
   Current Bid Section
   ========================================================================== */

.current-bid-section {
    text-align: center;
    padding: 20px 0;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 20px;
}

.current-bid .bid-label,
.starting-price .bid-label {
    display: block;
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.current-bid .bid-amount,
.starting-price .bid-amount {
    display: block;
    font-size: 36px;
    font-weight: 700;
    color: #1f2937;
}

.bid-count {
    margin-top: 8px;
    font-size: 14px;
    color: #6b7280;
}

.minimum-bid {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #e5e5e5;
}

.minimum-bid .min-bid-label {
    font-size: 12px;
    color: #6b7280;
}

.minimum-bid .min-bid-amount {
    font-weight: 600;
    color: #1f2937;
    margin-left: 4px;
}

/* ==========================================================================
   Countdown Timer
   ========================================================================== */

.auction-countdown {
    text-align: center;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
}

.countdown-title {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6b7280;
    margin: 0 0 16px;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

.countdown-value {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.countdown-label {
    font-size: 11px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.countdown-separator {
    font-size: 24px;
    font-weight: 700;
    color: #d1d5db;
    margin-bottom: 16px;
}

.auction-end-date {
    margin-top: 16px;
    font-size: 12px;
    color: #6b7280;
}

.auction-ended-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    background: #f3f4f6;
    border-radius: 8px;
    color: #6b7280;
    font-size: 14px;
}

/* Urgent countdown styling */
.countdown-urgent .countdown-value {
    color: #dc2626;
}

.countdown-urgent .countdown-timer {
    animation: urgentPulse 1s infinite;
}

@keyframes urgentPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* ==========================================================================
   Bidding Form
   ========================================================================== */

.auction-bidding-form-wrapper {
    margin: 24px 0;
    padding: 24px;
    background: #fff;
    border-radius: 8px;
    border: 2px solid #e5e5e5;
}

.login-required-notice {
    text-align: center;
    padding: 20px;
    background: #fef3c7;
    border-radius: 8px;
}

.login-required-notice .dashicons {
    color: #d97706;
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.login-required-notice a {
    color: #1d4ed8;
    font-weight: 600;
}

/* Bid Input Group */
.bid-input-group {
    position: relative;
    margin-bottom: 16px;
}

.bid-input-group .currency-symbol {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    font-weight: 600;
    color: #6b7280;
}

.bid-amount-input,
.max-bid-amount-input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    font-size: 24px;
    font-weight: 600;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    text-align: center;
    transition: border-color 0.2s;
}

.bid-amount-input:focus,
.max-bid-amount-input:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

/* Quick Bid Buttons */
.bid-quick-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.quick-bid-btn {
    flex: 1;
    min-width: 80px;
    padding: 10px 12px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.quick-bid-btn:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

.quick-bid-btn.active {
    background: #22c55e;
    border-color: #22c55e;
    color: #fff;
}

/* Place Bid Button */
.place-bid-btn {
    width: 100%;
    padding: 16px 24px;
    font-size: 18px;
    font-weight: 600;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.place-bid-btn:hover {
    background: linear-gradient(135deg, #16a34a, #15803d);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.place-bid-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Form Messages */
.bid-form-message,
.auto-bid-message {
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
}

.bid-form-message.success,
.auto-bid-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.bid-form-message.error,
.auto-bid-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Auto-Bid Section */
.auto-bid-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
}

.toggle-auto-bid {
    width: 100%;
    padding: 12px 16px;
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.toggle-auto-bid:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #374151;
}

.auto-bid-form {
    margin-top: 16px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
}

.auto-bid-description {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 16px;
}

.set-max-bid-btn {
    width: 100%;
    padding: 12px 16px;
    background: #3b82f6;
    border: none;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    font-weight: 500;
}

.set-max-bid-btn:hover {
    background: #2563eb;
}

/* Bidding Info */
.bidding-info {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e5e5;
}

.bidding-info p {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: #6b7280;
    margin: 8px 0;
}

.bidding-info .dashicons {
    flex-shrink: 0;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   Antique Details Section
   ========================================================================== */

.antique-details-section {
    margin: 30px 0;
    padding: 24px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
}

.antique-details-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e5e5;
}

.antique-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
}

.detail-value {
    font-size: 15px;
    font-weight: 500;
    color: #1f2937;
}

.detail-value.appraised-value {
    color: #059669;
    font-weight: 600;
}

/* Condition Colors */
.detail-value.condition-mint { color: #059669; }
.detail-value.condition-excellent { color: #10b981; }
.detail-value.condition-very_good { color: #34d399; }
.detail-value.condition-good { color: #6b7280; }
.detail-value.condition-fair { color: #d97706; }
.detail-value.condition-poor { color: #dc2626; }

/* Provenance & Certificate */
.provenance-section,
.certificate-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
}

.provenance-title,
.certificate-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 12px;
}

.provenance-content,
.certificate-content {
    font-size: 14px;
    line-height: 1.7;
    color: #374151;
}

/* ==========================================================================
   Bid History Table
   ========================================================================== */

.auction-bid-history {
    padding: 20px 0;
}

.bid-history-title {
    font-size: 18px;
    margin-bottom: 16px;
}

.no-bids-message {
    padding: 24px;
    text-align: center;
    background: #f9fafb;
    border-radius: 8px;
    color: #6b7280;
}

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

.bid-history-table th {
    text-align: left;
    padding: 12px 8px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    border-bottom: 2px solid #e5e5e5;
}

.bid-history-table td {
    padding: 12px 8px;
    border-bottom: 1px solid #f3f4f6;
}

.bid-history-table tr.highest-bid {
    background: #f0fdf4;
}

.bid-history-table tr.highest-bid td {
    font-weight: 500;
}

.winning-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #22c55e;
    color: #fff;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 8px;
}

.auto-bid-indicator {
    color: #6b7280;
    font-size: 12px;
}

.auto-bid-indicator .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.more-bids-note {
    margin-top: 12px;
    font-size: 13px;
    color: #6b7280;
    font-style: italic;
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

@media (max-width: 768px) {
    .auction-details-container,
    .auction-bidding-form-wrapper,
    .antique-details-section {
        padding: 16px;
    }

    .countdown-timer {
        gap: 4px;
    }

    .countdown-item {
        min-width: 50px;
    }

    .countdown-value {
        font-size: 24px;
    }

    .countdown-separator {
        font-size: 18px;
    }

    .current-bid .bid-amount,
    .starting-price .bid-amount {
        font-size: 28px;
    }

    .bid-amount-input {
        font-size: 20px;
        padding: 14px 14px 14px 40px;
    }

    .quick-bid-btn {
        flex: 0 0 calc(50% - 4px);
    }

    .antique-details-grid {
        grid-template-columns: 1fr;
    }

    .bid-history-table {
        font-size: 14px;
    }

    .bid-history-table th,
    .bid-history-table td {
        padding: 8px 4px;
    }
}

/* ==========================================================================
   Auction Shortcodes
   ========================================================================== */

/* Grid Layout */
.auction-grid {
    display: grid;
    gap: 24px;
    margin: 24px 0;
}

.auction-grid.columns-2 { grid-template-columns: repeat(2, 1fr); }
.auction-grid.columns-3 { grid-template-columns: repeat(3, 1fr); }
.auction-grid.columns-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .auction-grid.columns-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .auction-grid.columns-3,
    .auction-grid.columns-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .auction-grid.columns-2,
    .auction-grid.columns-3,
    .auction-grid.columns-4 { grid-template-columns: 1fr; }
}

/* Auction Card */
.auction-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s, transform 0.3s;
}

.auction-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.auction-card-image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.auction-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.auction-card:hover .auction-card-image img {
    transform: scale(1.05);
}

.auction-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auction-badge.status-active {
    background: #22c55e;
    color: #fff;
}

.auction-badge.status-pending {
    background: #f59e0b;
    color: #fff;
}

.auction-badge.status-ended,
.auction-badge.status-sold {
    background: #6b7280;
    color: #fff;
}

.auction-card-content {
    padding: 16px;
}

.auction-card-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px;
    line-height: 1.3;
}

.auction-card-title a {
    color: #1f2937;
    text-decoration: none;
}

.auction-card-title a:hover {
    color: #22c55e;
}

/* Bid Info in Card */
.auction-bid-info {
    margin-bottom: 12px;
}

.auction-bid-info .bid-label {
    display: block;
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auction-bid-info .bid-amount {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
}

.auction-bid-info .bid-count {
    font-size: 12px;
    color: #6b7280;
}

.auction-bid-info.bid-info-large .bid-amount {
    font-size: 28px;
}

/* Mini Countdown */
.auction-countdown-mini {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #f3f4f6;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #374151;
}

.countdown-icon {
    font-size: 16px;
}

/* Card Button */
.auction-card-btn {
    display: block;
    width: 100%;
    padding: 10px 16px;
    background: #1f2937;
    color: #fff;
    text-align: center;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.auction-card-btn:hover {
    background: #374151;
    color: #fff;
}

/* ==========================================================================
   Featured Auction
   ========================================================================== */

.auction-featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    overflow: hidden;
    margin: 24px 0;
}

@media (max-width: 768px) {
    .auction-featured {
        grid-template-columns: 1fr;
    }
}

.auction-featured-image {
    position: relative;
    aspect-ratio: 1/1;
    overflow: hidden;
}

.auction-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auction-featured-content {
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-label {
    display: inline-block;
    padding: 4px 12px;
    background: #fef3c7;
    color: #92400e;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    align-self: flex-start;
}

.auction-featured-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 16px;
    line-height: 1.2;
}

.auction-featured-title a {
    color: #1f2937;
    text-decoration: none;
}

.auction-featured-title a:hover {
    color: #22c55e;
}

.auction-featured-excerpt {
    font-size: 15px;
    line-height: 1.6;
    color: #4b5563;
    margin-bottom: 20px;
}

.auction-featured-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.detail-tag {
    padding: 4px 12px;
    background: #f3f4f6;
    border-radius: 4px;
    font-size: 13px;
    color: #374151;
}

.auction-featured-btn {
    display: inline-block;
    padding: 14px 28px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s;
    align-self: flex-start;
}

.auction-featured-btn:hover {
    background: linear-gradient(135deg, #16a34a, #15803d);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

/* ==========================================================================
   Shortcode Empty/Error States
   ========================================================================== */

.auction-shortcode-error,
.auction-shortcode-empty {
    padding: 40px 20px;
    text-align: center;
    background: #f9fafb;
    border-radius: 8px;
    color: #6b7280;
    margin: 24px 0;
}

.auction-shortcode-error {
    background: #fef2f2;
    color: #991b1b;
}
