/**
 * asset-detail.css — in-place asset detail / create surface styles.
 * Scoped to .astdv-* prefix (avoids collision with .dv-* vendor detail prefix).
 * Builds on detail-view.css shared base (already loaded).
 *
 * (c) Adrian Ranta. All rights reserved. Unauthorised use, reproduction and or distribution is strictly prohibited.
 */

/* -----------------------------------------------------------------------
   Read-only display values (GPS, last_seen, asset_tag, etc.)
   ----------------------------------------------------------------------- */
.astdv-readonly-value {
    padding: 6px 0;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.4;
}

/* -----------------------------------------------------------------------
   Async panels (audit trail, software, activity) embedded in the detail
   ----------------------------------------------------------------------- */
.astdv-async-panel {
    max-height: 320px;
    overflow-y: auto;
    font-size: 13px;
    padding: 8px 0;
}

.astdv-async-loading {
    color: #9ca3af;
    font-style: italic;
    padding: 8px 0;
}

/* -----------------------------------------------------------------------
   Custom-fields injection container
   ----------------------------------------------------------------------- */
.astdv-custom-fields-wrap {
    margin-top: 4px;
}

.astdv-custom-fields-wrap .form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.astdv-custom-fields-wrap label {
    font-size: 12px;
    font-weight: 500;
    color: #374151;
}

.astdv-custom-fields-wrap input,
.astdv-custom-fields-wrap select,
.astdv-custom-fields-wrap textarea {
    padding: 6px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.4;
    color: #1f2937;
    background: #fff;
    transition: border-color 0.15s;
}

.astdv-custom-fields-wrap input:focus,
.astdv-custom-fields-wrap select:focus,
.astdv-custom-fields-wrap textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99,102,241,0.12);
}

/* -----------------------------------------------------------------------
   Status badge pill in the hero strip
   ----------------------------------------------------------------------- */
.astdv-status-pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background: #e0e7ff;
    color: #3730a3;
    vertical-align: middle;
}

/* -----------------------------------------------------------------------
   Checkout status inline badges (mirrors assetForms checkout section)
   ----------------------------------------------------------------------- */
.astdv-checkout-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.astdv-checkout-badge--out   { background: #fef3c7; color: #92400e; }
.astdv-checkout-badge--avail { background: #dcfce7; color: #166534; }

/* -----------------------------------------------------------------------
   Hardware stats mini-cards (agent-managed assets)
   ----------------------------------------------------------------------- */
.astdv-hw-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}

.astdv-hw-card {
    padding: 10px;
    border-radius: 6px;
    text-align: center;
}

.astdv-hw-label {
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 4px;
}

.astdv-hw-value {
    font-size: 18px;
    font-weight: 600;
}

/* -----------------------------------------------------------------------
   Delete button area
   ----------------------------------------------------------------------- */
.astdv-danger-zone {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e9ecef;
}

/* -----------------------------------------------------------------------
   Responsive: collapse the 2-col grid on narrow viewports
   ----------------------------------------------------------------------- */
@media (max-width: 600px) {
    .astdv-hw-grid {
        grid-template-columns: 1fr 1fr;
    }
}
