/*
 * Auction Registration & Bids - Live Board Styles
 * Version: 2.0 - 100% Bid2Buy Design Alignment
 * Fully Customizable via Plugin Settings
 */

/* ==========================================
   CSS VARIABLES (Populated from Plugin Settings)
   ========================================== */
:root {
    /* BID2BUY Color Scheme - Consistent across all plugins */
    --arb-primary: #E8A448;        /* BID2BUY Orange */
    --arb-secondary: #3B6B7D;      /* BID2BUY Teal */
    --arb-background: #1E3A4C;     /* BID2BUY Dark Teal */
    --arb-text: #ffffff;
    --arb-accent: #E8A448;         /* BID2BUY Orange */
    --arb-badge: #E85C4A;          /* BID2BUY Danger Red */
    --arb-control: #3B6B7D;        /* BID2BUY Teal */
    --arb-success: #4CAF50;        /* Success Green */
    --arb-danger: #E85C4A;         /* BID2BUY Danger Red */

    /* Typography */
    --arb-font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    --arb-base-size: 16px;
    --arb-lot-title-size: 28px;
    --arb-bid-size: 32px;
    --arb-sold-size: 96px;

    /* Buttons */
    --arb-button-radius: 8px;

    /* Spacing */
    --arb-gap: 20px;
    --arb-padding: 15px;
}

/* ==========================================
   BASE LAYOUT & CONTAINER
   ========================================== */
.arb-live-board {
    font-family: var(--arb-font-family);
    font-size: var(--arb-base-size);
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px;
    color: var(--arb-text);
    background: #1a1a1a;
    position: relative;
}

/* ==========================================
   TOP SECTION - 3 COLUMN LAYOUT
   ========================================== */
.arb-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--arb-gap);
    margin-bottom: var(--arb-gap);
}

/* ==========================================
   VIDEO SECTION (LEFT PANEL)
   ========================================== */
.arb-video {
    position: relative;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    min-height: 500px;
}

.arb-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--arb-badge);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(255, 0, 0, 0.4);
    animation: pulse 2s infinite;
}

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

.arb-video iframe,
.arb-video-placeholder {
    width: 100%;
    height: 500px;
    display: block;
    border: none;
}

.arb-video-placeholder {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 18px;
    font-weight: 500;
}

/* ==========================================
   LOT CARD (CENTER PANEL)
   ========================================== */
.arb-lot-card {
    background: var(--arb-background);
    border-radius: 12px;
    padding: var(--arb-padding);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.arb-lot-title {
    font-size: var(--arb-lot-title-size);
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--arb-text);
    letter-spacing: -0.5px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.arb-lot-title span[data-bind="lot-id"] {
    color: var(--arb-accent);
}

.arb-lot-image {
    height: 200px;
    background: #1a1a1a;
    margin-bottom: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    overflow: hidden;
    position: relative;
}

.arb-lot-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.arb-lot-image::before {
    content: "Product Image";
    position: absolute;
    font-size: 14px;
    color: #555;
}

.arb-lot-info {
    flex: 1;
}

.arb-lot-info > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 16px;
}

.arb-lot-info > div:last-child {
    border-bottom: none;
}

.arb-lot-info span {
    font-weight: 700;
    font-size: 18px;
    color: var(--arb-primary);
}

/* ==========================================
   BID PANEL (RIGHT PANEL)
   ========================================== */
.arb-bid-panel {
    background: var(--arb-background);
    border-radius: 12px;
    padding: var(--arb-padding);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.arb-bid-header {
    font-size: 22px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
    text-align: center;
    color: var(--arb-text);
    border-bottom: 3px solid var(--arb-primary);
    padding-bottom: 12px;
}

.arb-bid-panel > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 16px;
}

.arb-bid-panel > div span {
    font-weight: 700;
    font-size: var(--arb-bid-size);
    color: var(--arb-primary);
}

/* ==========================================
   BUTTONS - HIGHLY POLISHED
   ========================================== */
.arb-btn {
    display: block;
    width: 100%;
    padding: 18px 24px;
    margin: 10px 0;
    border: none;
    border-radius: var(--arb-button-radius);
    font-weight: 700;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.arb-btn::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition:
        width 0.6s,
        height 0.6s;
}

.arb-btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Button Style: Gradient (Default) */
.arb-btn-primary {
    background: linear-gradient(
        135deg,
        var(--arb-primary) 0%,
        var(--arb-secondary) 100%
    );
    color: white;
}

.arb-btn-secondary {
    background: linear-gradient(135deg, #333 0%, #444 100%);
    color: white;
}

/* Button Style: Flat */
.arb-btn.style-flat {
    background: var(--arb-primary);
    box-shadow: none;
}

/* Button Style: 3D */
.arb-btn.style-3d {
    background: var(--arb-primary);
    box-shadow:
        0 6px 0 var(--arb-secondary),
        0 8px 12px rgba(0, 0, 0, 0.3);
}

.arb-btn.style-3d:active {
    transform: translateY(4px);
    box-shadow:
        0 2px 0 var(--arb-secondary),
        0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Button Sizes */
.arb-btn.size-small {
    padding: 12px 18px;
    font-size: 14px;
}

.arb-btn.size-medium {
    padding: 15px 20px;
    font-size: 16px;
}

.arb-btn.size-large {
    padding: 18px 24px;
    font-size: 18px;
}

.arb-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
}

.arb-btn:active {
    transform: translateY(0);
}

.arb-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ==========================================
   LEADING INDICATOR
   ========================================== */
.arb-leading {
    margin-top: 15px;
    padding: 15px;
    background: rgba(76, 175, 80, 0.1);
    border: 2px solid var(--arb-primary);
    border-radius: 8px;
    color: var(--arb-primary);
    font-weight: 700;
    font-size: 18px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: glow 2s infinite;
}

@keyframes glow {
    0%,
    100% {
        box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(76, 175, 80, 0.6);
    }
}

/* ==========================================
   BOTTOM SECTION - BID ACTIVITY
   ========================================== */
.arb-bottom {
    width: 100%;
    background: var(--arb-background);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    position: relative;
}

.arb-activity-title {
    font-size: 22px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.arb-activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.arb-activity-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 16px;
    transition: background 0.3s ease;
}

.arb-activity-list li:hover {
    background: rgba(255, 255, 255, 0.02);
}

.arb-activity-list li:last-child {
    border-bottom: none;
}

.bid-paddle {
    font-weight: 700;
    font-size: 18px;
    color: var(--arb-text);
}

.bid-amount {
    font-size: 20px;
    font-weight: 700;
    color: var(--arb-primary);
}

.bid-tag {
    font-size: 14px;
    color: #888;
    font-style: italic;
    margin-left: 10px;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.bid-tag.floor {
    color: #ffb74d;
    background: rgba(255, 183, 77, 0.1);
}

.bid-tag.online {
    color: #4fc3f7;
    background: rgba(79, 195, 247, 0.1);
}

/* ==========================================
   SOLD BANNER - DRAMATIC OVERLAY
   ========================================== */
.arb-sold {
    display: none;
}

/* Style: Overlay (Default - matches Bid2Buy) */
.arb-sold.is-active.style-overlay {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    animation: soldReveal 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.arb-sold.is-active.style-overlay .sold-text {
    font-size: var(--arb-sold-size);
    font-weight: 900;
    color: var(--arb-accent);
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
    margin-bottom: 30px;
    letter-spacing: 8px;
}

.arb-sold.is-active.style-overlay .sold-details {
    font-size: 36px;
    font-weight: 600;
    color: var(--arb-text);
    text-align: center;
}

.arb-sold.is-active.style-overlay .sold-lot {
    margin: 10px 0;
}

.arb-sold.is-active.style-overlay .sold-paddle {
    color: var(--arb-primary);
    font-weight: 700;
}

.arb-sold.is-active.style-overlay .sold-amount {
    color: var(--arb-accent);
    font-size: 48px;
    font-weight: 900;
    margin-top: 20px;
}

/* Style: Inline Banner */
.arb-sold.is-active.style-inline {
    display: block;
    background: var(--arb-primary);
    padding: 20px;
    border-radius: 8px;
    margin-top: 15px;
    font-weight: 700;
    text-align: center;
    font-size: 24px;
}

/* Style: Center Popup */
.arb-sold.is-active.style-popup {
    display: flex;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.95);
    padding: 60px;
    border-radius: 20px;
    border: 3px solid var(--arb-accent);
    flex-direction: column;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

/* Sold Animation */
@keyframes soldReveal {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.arb-sold.animation-enabled {
    animation: soldReveal 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================
   AUCTIONEER UI ADDITIONS
   ========================================== */
.arb-auctioneer-controls {
    background: var(--arb-control);
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.arb-auctioneer-controls.position-top {
    order: -1;
}

.arb-auctioneer-controls.position-bottom {
    order: 999;
    margin-top: 20px;
    margin-bottom: 0;
}

.arb-auctioneer-controls.position-left,
.arb-auctioneer-controls.position-right {
    position: fixed;
    top: 100px;
    width: 250px;
    z-index: 1000;
}

.arb-auctioneer-controls.position-left {
    left: 20px;
}

.arb-auctioneer-controls.position-right {
    right: 20px;
}

.arb-control-header {
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    color: white;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 8px;
}

.arb-control-btn {
    display: block;
    width: 100%;
    padding: 12px 20px;
    margin: 8px 0;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.arb-control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(5px);
}

.arb-control-btn.primary {
    background: var(--arb-primary);
}

.arb-control-btn.danger {
    background: #f44336;
}

.arb-offline-input {
    margin: 15px 0;
}

.arb-offline-input label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: white;
}

.arb-offline-input input {
    width: 100%;
    padding: 10px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.2);
    color: white;
    font-size: 16px;
}

.arb-stats-panel {
    margin-top: 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.arb-stats-panel .stat-item {
    display: flex;
    justify-content: space-between;
    margin: 8px 0;
    color: white;
}

.arb-stats-panel .stat-value {
    font-weight: 700;
    color: var(--arb-accent);
}

/* ==========================================
   CAMERA PIN CONTROLS (Auctioneer)
   ========================================== */
.arb-pin-controls {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.arb-pin-btn {
    padding: 10px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.arb-pin-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.arb-pin-btn.active {
    background: var(--arb-primary);
    border-color: var(--arb-primary);
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */
@media (max-width: 1200px) {
    .arb-top {
        grid-template-columns: 1fr 1fr;
    }

    .arb-video {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .arb-live-board {
        padding: 5px;
    }

    .arb-top {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .arb-video iframe,
    .arb-video-placeholder {
        height: 300px;
    }

    .arb-btn {
        padding: 15px 20px;
        font-size: 16px;
    }

    .arb-lot-title {
        font-size: 22px;
    }

    .arb-bid-header {
        font-size: 18px;
    }

    .arb-sold.is-active.style-overlay .sold-text {
        font-size: 48px;
    }

    .arb-sold.is-active.style-overlay .sold-details {
        font-size: 24px;
    }

    .arb-auctioneer-controls.position-left,
    .arb-auctioneer-controls.position-right {
        position: static;
        width: 100%;
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .arb-video iframe,
    .arb-video-placeholder {
        height: 220px;
    }

    .arb-lot-image {
        height: 150px;
    }

    .arb-activity-list li {
        flex-direction: column;
        align-items: flex-start;
    }

    .bid-amount {
        margin-top: 5px;
    }
}

/* ==========================================
   LOADING & STATES
   ========================================== */
.arb-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.arb-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--arb-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.arb-error {
    background: rgba(244, 67, 54, 0.1);
    border: 2px solid #f44336;
    border-radius: 8px;
    padding: 20px;
    color: #f44336;
    text-align: center;
    font-weight: 600;
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */
.arb-btn:focus,
.arb-control-btn:focus,
.arb-pin-btn:focus {
    outline: 3px solid var(--arb-accent);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ==========================================
   PRINT STYLES
   ========================================== */
@media print {
    .arb-auctioneer-controls,
    .arb-bid-panel,
    .arb-btn {
        display: none;
    }

    .arb-live-board {
        color: #000;
    }

    .arb-video {
        display: none;
    }
}
