/* ================================================================
   Handbid Integration — Frontend Styles
   v1.0.0
   ================================================================ */

/* ---- Reset / base -------------------------------------------- */
.handbid-auctions-grid,
.handbid-items-grid,
.handbid-auction-detail,
.handbid-thermometer,
.handbid-dashboard {
    font-family: inherit;
    box-sizing: border-box;
}

.handbid-auctions-grid *,
.handbid-items-grid *,
.handbid-auction-detail *,
.handbid-thermometer *,
.handbid-dashboard * {
    box-sizing: border-box;
}

/* ---- Auction card grid --------------------------------------- */
.handbid-auctions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin: 20px 0;
}

.handbid-auction-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.07);
    transition: box-shadow .2s ease, transform .2s ease;
}

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

.handbid-auction-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.handbid-auction-body {
    padding: 16px;
}

.handbid-auction-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 8px;
    color: #1a202c;
}

.handbid-auction-desc {
    font-size: .9rem;
    color: #4a5568;
    margin: 0 0 12px;
    line-height: 1.5;
}

.handbid-auction-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.handbid-meta-item {
    font-size: .85rem;
    color: #718096;
}

/* ---- Single auction detail ----------------------------------- */
.handbid-auction-detail {
    max-width: 800px;
    margin: 20px 0;
}

.handbid-auction-hero img {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

.handbid-auction-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 12px;
    color: #1a202c;
}

.handbid-auction-description {
    color: #4a5568;
    line-height: 1.7;
    margin-bottom: 20px;
}

.handbid-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

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

.handbid-detail-item .label {
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #718096;
}

.handbid-detail-item .value {
    font-size: 1rem;
    font-weight: 500;
    color: #1a202c;
}

/* ---- Items grid ---------------------------------------------- */
.handbid-items-grid {
    display: grid;
    gap: 20px;
    margin: 20px 0;
}

.handbid-cols-1 { grid-template-columns: 1fr; }
.handbid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.handbid-cols-3 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.handbid-item-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    transition: box-shadow .2s ease;
}

.handbid-item-card:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,.1);
}

.handbid-item-image img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.handbid-item-body {
    padding: 14px;
}

.handbid-item-name {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 6px;
    color: #1a202c;
}

.handbid-item-desc {
    font-size: .85rem;
    color: #718096;
    margin: 0 0 10px;
}

.handbid-item-meta {
    margin-bottom: 12px;
}

.handbid-item-price {
    display: flex;
    justify-content: space-between;
    font-size: .85rem;
    padding: 4px 0;
    border-bottom: 1px solid #edf2f7;
}

.handbid-item-price:last-child {
    border-bottom: none;
}

.handbid-item-price .label { color: #718096; }
.handbid-item-price .value { font-weight: 600; color: #1a202c; }

/* ---- Thermometer -------------------------------------------- */
.handbid-thermometer {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px 24px;
    margin: 20px 0;
    max-width: 600px;
}

.handbid-thermo-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 14px;
}

.handbid-thermo-bar-wrap {
    background: #edf2f7;
    border-radius: 999px;
    height: 24px;
    overflow: hidden;
    margin-bottom: 10px;
}

.handbid-thermo-bar {
    height: 100%;
    border-radius: 999px;
    background: #2ecc71;
    transition: width .6s ease;
    min-width: 4px;
}

.handbid-thermo-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .875rem;
    flex-wrap: wrap;
    gap: 6px;
}

.handbid-thermo-pct {
    font-weight: 700;
    color: #2d3748;
}

.handbid-thermo-amounts {
    color: #4a5568;
}

.handbid-thermo-amounts strong {
    color: #1a202c;
}

/* ---- Bidder dashboard --------------------------------------- */
.handbid-dashboard {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 24px;
    margin: 20px 0;
}

.handbid-dashboard-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 16px;
    color: #1a202c;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 12px;
}

.handbid-dashboard-profile {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    padding: 14px;
    background: #f7fafc;
    border-radius: 6px;
}

.handbid-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e8f0;
}

.handbid-profile-info h4 {
    margin: 0 0 4px;
    font-size: 1rem;
    color: #1a202c;
}

.handbid-profile-info p {
    margin: 0;
    font-size: .875rem;
    color: #718096;
}

.handbid-dashboard h4 {
    font-size: .95rem;
    font-weight: 600;
    margin: 16px 0 10px;
    color: #2d3748;
}

.handbid-dashboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}

.handbid-dashboard-table th {
    text-align: left;
    padding: 8px 10px;
    background: #f7fafc;
    border-bottom: 2px solid #e2e8f0;
    font-weight: 600;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #718096;
}

.handbid-dashboard-table td {
    padding: 10px 10px;
    border-bottom: 1px solid #edf2f7;
    color: #2d3748;
    vertical-align: middle;
}

.handbid-dashboard-table tr:last-child td {
    border-bottom: none;
}

/* ---- Status badges ------------------------------------------ */
.handbid-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.handbid-badge--open,
.handbid-badge--active   { background: #c6f6d5; color: #22543d; }
.handbid-badge--upcoming,
.handbid-badge--pending  { background: #bee3f8; color: #2a4365; }
.handbid-badge--closed,
.handbid-badge--past     { background: #fed7d7; color: #742a2a; }
.handbid-badge--preview  { background: #fefcbf; color: #744210; }

/* ---- Buttons ------------------------------------------------ */
.handbid-btn {
    display: inline-block;
    background: #3182ce;
    color: #fff !important;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: .875rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: background .2s ease;
    cursor: pointer;
    border: none;
}

.handbid-btn:hover {
    background: #2b6cb0;
    color: #fff !important;
}

.handbid-btn--large {
    padding: 12px 28px;
    font-size: 1rem;
}

.handbid-btn--sm {
    padding: 5px 12px;
    font-size: .8rem;
}

/* ---- Notices & errors --------------------------------------- */
.handbid-notice {
    background: #ebf8ff;
    border-left: 4px solid #3182ce;
    padding: 12px 16px;
    border-radius: 0 6px 6px 0;
    color: #2c5282;
    font-size: .9rem;
    margin: 10px 0;
}

.handbid-error {
    background: #fff5f5;
    border-left: 4px solid #e53e3e;
    padding: 12px 16px;
    border-radius: 0 6px 6px 0;
    color: #742a2a;
    font-size: .9rem;
    margin: 10px 0;
}

.handbid-count {
    font-weight: 700;
    color: #3182ce;
}

/* ---- Responsive -------------------------------------------- */
@media (max-width: 640px) {
    .handbid-auctions-grid         { grid-template-columns: 1fr; }
    .handbid-cols-2,
    .handbid-cols-3                { grid-template-columns: 1fr; }
    .handbid-detail-grid           { grid-template-columns: 1fr 1fr; }
    .handbid-thermo-labels         { flex-direction: column; align-items: flex-start; }
    .handbid-dashboard-profile     { flex-direction: column; text-align: center; }
    .handbid-dashboard-table       { font-size: .8rem; }
    .handbid-dashboard-table th,
    .handbid-dashboard-table td    { padding: 6px 6px; }
}
