/**
 * AutoBid Proxy — Frontend CSS | INARGI.CO | v1.5.0
 */

/* ── Campo en página de producto ──────────────────────────────────────────── */

.autobid-field-wrap {
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 16px 0;
    background: #fafafa;
    font-size: 0.95em;
}

.autobid-toggle-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    cursor: pointer;
    user-select: none;
}

.autobid-label {
    font-weight: 600;
    flex: 1;
    color: #333;
}

.autobid-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1em;
    color: #555;
    padding: 0 4px;
    line-height: 1;
}

.autobid-form {
    padding: 12px 14px 14px;
    border-top: 1px solid #eee;
}

.autobid-description {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.autobid-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 4px;
    color: #444;
}

.autobid-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.autobid-max-bid-input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 1em;
    max-width: 160px;
}

.autobid-save-btn {
    white-space: nowrap;
}

.autobid-deactivate-btn {
    display: inline-block;
    margin-top: 6px;
    font-size: 0.85em;
    color: #c62828;
    background: none;
    border: 1px solid #c62828;
    padding: 4px 10px;
    border-radius: 3px;
    cursor: pointer;
}

.autobid-deactivate-btn:hover {
    background: #c62828;
    color: #fff;
}

/* ── Mensajes ─────────────────────────────────────────────────────────────── */

.autobid-message,
.autobid-row-message {
    display: none;
    padding: 6px 10px;
    border-radius: 3px;
    margin-top: 6px;
    font-size: 0.88em;
}

.autobid-msg--ok {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.autobid-msg--error {
    background: #ffebee;
    color: #b71c1c;
    border: 1px solid #ef9a9a;
}

/* ── Badges ───────────────────────────────────────────────────────────────── */

.autobid-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.78em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    vertical-align: middle;
    white-space: nowrap;
}

.autobid-badge--active {
    background: #e3f2fd;
    color: #0d47a1;
    border: 1px solid #90caf9;
}

.autobid-badge--winning {
    background: #e8f5e9;
    color: #1b5e20;
    border: 1px solid #66bb6a;
}

.autobid-badge--limit {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffb74d;
}

.autobid-badge--inactive {
    background: #f5f5f5;
    color: #757575;
    border: 1px solid #bdbdbd;
}

.autobid-badge--saved {
    background: #f3e5f5;
    color: #4a148c;
    border: 1px solid #ce93d8;
}

/* ── Tabla mi-autobid ─────────────────────────────────────────────────────── */

.autobid-my-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.autobid-my-table th,
.autobid-my-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.autobid-my-table th {
    background: #f7f7f7;
    font-weight: 600;
    font-size: 0.9em;
    color: #444;
}

.autobid-my-table tr:last-child td {
    border-bottom: none;
}

.autobid-my-table td a {
    font-weight: 500;
    text-decoration: none;
    color: #0073aa;
}

.autobid-my-table td a:hover {
    text-decoration: underline;
}

.autobid-my-table .button.small {
    padding: 4px 10px;
    font-size: 0.83em;
    margin: 2px 0;
}

.autobid-empty {
    color: #888;
    padding: 16px 0;
    font-style: italic;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
    .autobid-input-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .autobid-max-bid-input {
        max-width: 100%;
        width: 100%;
    }

    .autobid-my-table thead {
        display: none;
    }

    .autobid-my-table tr {
        display: block;
        border-bottom: 2px solid #eee;
        margin-bottom: 10px;
        padding-bottom: 8px;
    }

    .autobid-my-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid #f0f0f0;
        padding: 6px 8px;
    }

    .autobid-my-table td::before {
        content: attr(data-title);
        font-weight: 600;
        font-size: 0.85em;
        color: #555;
        flex: 0 0 40%;
    }
}
